GetSimple Support Forum
QUESTION Internationalization (I18N) - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: QUESTION Internationalization (I18N) (/showthread.php?tid=6560)



Internationalization (I18N) - Rene - 2014-07-11

Hi,

I use 3 languages and use $language var on pages.

http://www.site.nl/?setlang=nl (works)
http://www.site.nl/page/?setlang=nl (works)
http://www.site.nl/page/subpage/?setlang=nl (doesn't work, $language var not set)

Tried to alter the .htaccess but cann't get it to work ;(

/* EDIT 2 */

The subpage (see above) is a Special Page, Special Pages are saved under 1 (default) language.
On a different (older) GS site (same setup) but with a default subpage it works.


RE: Internationalization (I18N) - Rene - 2014-07-14

Allmost 30 views later and no reaction, my question was either stupid or unclear. One more try ...

I use three languages ​​(en, de, nl), in the website navigation I use a dropdown language with flag of active language (var $language).

If I set the language on start or parent page it works but if I set this from a childpage it works half, the menu is in right language but my dropdown language goes back to the default language. In other words it seems like var $language is no longer initiated.

Anybody a clue?


RE: Internationalization (I18N) - mvlcek - 2014-07-14

(2014-07-14, 06:43:58)Rene Wrote: Allmost 30 views later and no reaction, my question was either stupid or unclear. One more try ...

I use three languages ​​(en, de, nl), in the website navigation I use a dropdown language with flag of active language (var $language).

If I set the language on start or parent page it works but if I set this from a childpage it works half, the menu is in right language but my dropdown language goes back to the default language. In other words it seems like var $language is no longer initiated.

Anybody a clue?

$language is the language of the currently selected page. So if you have switched to german with "?setlang=de", but the current page has no german version, $language will be "en".

You could use the following code (accessing "internal" functionality) to get the currently "preferred" language:
Code:
$mylanguages = I18nFrontend::getLanguages();
$mylanguage = $mylanguages[0];



RE: Internationalization (I18N) - Rene - 2014-07-15

(2014-07-14, 07:55:00)mvlcek Wrote: You could use the following code (accessing "internal" functionality) to get the currently "preferred" language:
Code:
$mylanguages = I18nFrontend::getLanguages();
$mylanguage = $mylanguages[0];

Thx mvlcek, your code works perfect (as usual).


RE: Internationalization (I18N) - bonyway - 2014-08-12

Hi Rene,
I need also a dropdown menu with three languages and flags.
I'm very familiar with css & html, but not with programming.

Could you explain how you implemented it, but just as easy as possible and step through :-)

Thx a lot in advance!