Query_String Language switch button for Bootstrap website
Hi,
Sorry that I'm new in fuelcms and I would like to get some idea of the language switch button.
I've create a website which used Bootstrap and query_string for language_mode.
In my header block, below is the switch button code:
EN
DE
I just want to change the "
http://www.mydomain.com/aboutus?&lang=en" lang value to switch the language, any suggestion? Or any other method for the language switch just like the inline editing language switcher?
Many thanks.
Azid
Comments
However i doubt your en lang works, as default it is "english"
Yes I change the lang value (de / en) at URL by hand working very well.
Just wonder any simple method to switch the language by a button.
Menu class will be the next step after I solve the language button.
echo site_url('my_url', FALSE, 'de');
echo current(False, 'de');
But, when I click the English button, the URL doesn't show the query_strings value and it stay at Deutsch page. After I manually add ?&lang=en on the URL it can show correctly.
Any idea why it happened? And could I fix all URL show the query_string value even Default English pages?
Thanks a lot.
$CI->fuel->languages->use_cookies = FALSE;
Also, I just pushed a change to the develop branch which includes a new FUEL configuration parameter called "language_force_default_to_site_url" which if set to TRUE will automatically append it to the default language URLs:
https://github.com/daylightstudio/FUEL-CMS/commit/09ebe43fe214adee6ceb153f1f09824fcc4e8969
Many thanks~!!!