Jump to content

changing language with a link


Gil Ronen

Recommended Posts

Posted

is it possible to do so? like you can in vBuleltin 4 if you do http://website.co,/?langid=1 for example?

I want to do that if a user goes to en.website.com he will be redirected to the website in english.

Thanks.

Posted
4 hours ago, Gil Ronen said:

is it possible to do so? like you can in vBuleltin 4 if you do http://website.co,/?langid=1 for example?

I want to do that if a user goes to en.website.com he will be redirected to the website in english.

Thanks.

This should be possible, but you'll need to attach the csrf value to the link.

    {{$languages = \IPS\Lang::getEnabledLanguages();}}
    {{foreach $languages as $id => $lang }}
   <a href="{url="app=core&module=system&controller=language&id={$id}" csrf="true"}">{$lang->title}</a>
    {{endforeach}}

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...