1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Changing language without xftoken

Discussion in 'XenForo Questions and Support' started by Cryptaline, Mar 1, 2016.

  1. Cryptaline

    Cryptaline Active Member


    Is it possible to change language without xftoken? Eg: I have 2 languages - en + ru. And I have a custom switcher with link to the language which looks like:
    so when I click on it my forum change its language. Everything works fine, however from time to time link just changes its address, so I need to change it aswell. Is it possible somehow to avoid it?
    Or is there is another solution?

    Thank you.
    Last edited: Mar 1, 2016
  2. Cryptaline

    Cryptaline Active Member

    Okay. I ve solved this issue. Its just a lil bit new for me. So if s1 interested:

    We go to >
    language_chooser - template

    then we check how our chooser link look, in my example it was like this:

    <a href="{xen:link 'misc/language', '', 'language_id={$language.language_id}', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}">{$language.title}</a>

    and we change our switcher link to this one, so it will look like this:

    <a href="{xen:link 'misc/language', '', 'language_id=3}', '_xfToken={$visitor.csrf_token_page}', 'redirect={$redirect}'}"><div id="tiger-language-col">Change language: Russian</div></a>

    Enjoy ur new lang switch button :coffee:

    Im sure that it was not that hard to help a lil with it, and Im sure few ppl were in this topic aswell.

Share This Page