Topic: Automatic Language Detection
jfudickar
avatar
Freshman
Freshman
Posts: 4

Posted:
9.Feb 2004 - 21:56

Hi,

is it possible to automaticly activate a specific language.

If using my national web-address www.oratool.de i want to activate the german language, if using the international www.oratool.com i want to use the english language.

Any ideas ?

Greetings and thanks
Jens
nate_02631
avatar
Professional
Professional
Posts: 3055

Posted:
10.Feb 2004 - 02:22

You can change the language dynamically by reloading the page with:

Code

&newlang=en

tacked on to the URL (or ? if there are no other parameters)...

You could perhaps, in the themeheader of your theme, use a PHP environment variable to check what URL is being accessed, and reload the page in that language (using the PHP env variable plus the appended desired language) if it is already not set to the language in question. There's a pnAPI function call "getlanguage" or something to that effect to find out what language is being used...

--
Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods

Cape Cod Travel Info...
jfudickar
avatar
Freshman
Freshman
Posts: 4

Posted:
15.Feb 2004 - 23:07

Hi

Thanks. It works. With one comment. The language shortcut is "eng" icon_smile

Greetings
Jens