Bart00
Posts: 8
|
| Posted: 02/04/2010, 3:41 AM |
|
In my code somewhere I want to retrieve the preferred language which CodeCharge is using and do something with it (echo it, for example)
How do I do this? I turned on i18n, added 2 languages two the list (nl-NL (default), en-GB). My browser prefers nl-NL, so I want to echo this. If someone from an english speaking country enters my site, i want it to echo en-GB, and for all other nl-NL should be shown.
What exactly should I be fetching?
|
 |
 |
datadoit
|
| Posted: 02/04/2010, 6:38 AM |
|
Another one of those undocumented thangs!
From code:
global $CCSLocales;
echo $CCSLocales->DefaultLocale;
From HTML, see this thread: http://forums.codecharge.com/posts.php?post_id=104282
|
|
|
 |
Bart00
Posts: 8
|
| Posted: 02/05/2010, 12:25 AM |
|
Thanks!
Actually I needed $CCSLocales->Locale;, but you got me on the right track!
|
 |
 |
|