MailingList


RE: Getting the iso-639-1 Language code from a Country

by Chris Cruft :: Rate this Message:

Reply to Author | View in Thread

Daniel,
This subject was quite topical last year when I submitted some patches to Globalize.  There is, of course, a big problem in that the mapping of Country->Language is not 1:1.  Think Canada, Switzerland, China, etc.  So there will be no perfect solution.  Instead, I believe that we considered a default language per country that could optionally be setup in the database.
 
AFAIK, nothing became of those discussions.
 
-Chris
 
Chris Hapgood
Phone: +1 434 989 8584
Skype: chris.hapgood
Email: cch1@...
 


From: Daniel Dias [mailto:lupeke@...]
Sent: Monday, March 03, 2008 13:59
To: users@...
Subject: Getting the iso-639-1 Language code from a Country

Hi.

I need to change the Locale in my application according to the current user Country (user is logged in and country_id available through the active session). Looking inside globalize's code and after same research I still can't figure out a way to get the iso-639-1 language code from one country.

Making an association between Languages and Countries could work, but it's hard and I don't think it's the better solution.

Any help will be appreciated.

Thanks.

--
Daniel Dias

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.3/1307 - Release Date: 02/03/2008 15:59


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.3/1307 - Release Date: 02/03/2008 15:59

 « Return to Thread: Getting the iso-639-1 Language code from a Country