We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16601
    • 13 Posts
    I use advsearch on revolution and i tries to change the lang. I upload the new land directory with the translation files. What am i doing now?
      • 36996
      • 211 Posts
      Now change the language tags in your tpl chunks.
      For example from this:
      [[%advsearch.search? &namespace=`advsearch` &topic=`default`]]

      To this:
      [[%advsearch.search? &namespace=`advsearch` &topic=`default` &language=`your_language_key`]]


      Another option is to go to system settings -> Lexicon and language, and change the culture key setting to your language.
      That way the default output of the language tags will be in your desired language.
        • 44814
        • 2 Posts
        I am working on a website in revolution, supporting two languages (English & Farsi) which separated by two folders instead of two contexts.
        Using the search form in each language must show results in the same language.
        I've created fa folder under core/components/advsearch/lexicon and translated the default.inc.php file.
        According to your posts, I've added language to [[%advsearch.search? &namespace=`advsearch` &topic=`default` &language=`[[+myLang]]`]] and fill it by [[AdvSearchForm? &method=`POST` &myLang=`fa`]] but still results are in english.
        (myLang placeholder gives me option to call each lexicon in a related language)
        I would appreciate your advice.
          • 36996
          • 211 Posts
          [[AdvSearchForm? &method=`POST` &myLang=`fa`]]

          This snippet is for outputting the search form, it has nothing to do with the results.
          To output the form in your language, you need to edit the language tags in your chunk.
          If your chunk is called faSearchForm then the snippet call will look like this:
          [[AdvSearchForm? &method=`POST` &tpl=`faSearchForm` &landing=`80`]]

          And should output the search form in your language and show results on a page with an id of 80.

          To show results in Farsi, you can use the AdvSearch snippet on the results page (80 on the above example), and restrict the search to the Farsi folder.
          So if the folder Id is 30, you can use:
          [[!AdvSearch? &ids=`[[!GetIds? &ids=`c30`]]]]


          This example also uses the getIds snippet to get all the children of the resource with the id of 30.
            • 44814
            • 2 Posts
            I changed the snippet to [[!AdvSearch? &ids=`[[!GetIds? &ids=`c5`]]` &showExtract=`0` &containerTpl=`AdvSearchResults`]] and it gives error below instead of search result:

            Warning: PDOStatement::execute() [pdostatement.execute]: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /home/nipakcoc/public_html/core/xpdo/xpdo.class.php on line 1006
            There were no search results. Please try using more general terms to get more results.