CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 How do I retrieve the preferred language?

Print topic Send  topic

Author Message
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?
View profile  Send private message
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!
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.