Jump to content


Photo

Non US English localisation

localisation date format

  • Please log in to reply
10 replies to this topic

#1 David

David

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationAustralia

Posted 27 March 2012 - 11:31 AM

Hi

Is there a way to configure the use of non-US date formatting when using English? In Australia our local date format is the same as England - i.e. DD/MM/YYYY not the US format of MM/DD/YYYY. I haven't found a way to localise the date format. Is that possible at the moment?


Thanks

David
...

#2 Jason

Jason

    Administrator

  • Administrators
  • 716 posts
  • LocationChicago

Posted 27 March 2012 - 01:58 PM

Hi

Is there a way to configure the use of non-US date formatting when using English? In Australia our local date format is the same as England - i.e. DD/MM/YYYY not the US format of MM/DD/YYYY. I haven't found a way to localise the date format. Is that possible at the moment?


Thanks

David
...

David,
Currently the way this works is based on the i18n. So if you are in Spain and you switch to Spanish, then the localization changes for date and time change automatically. I now realize we also need this for English speaking countries too since right now everyone who speaks English is localized to the US. Can you tell me which code in here:




yii/framework/i18n/data

corresponds to your location? I think I can then easily add the ability to switch to Australian English, which should change the localization then accordingly.

Thanks

Jason Green
Zurmo Team
Need support? Upgrade now


#3 SapporoGuy

SapporoGuy

    Member

  • Members
  • PipPip
  • 25 posts

Posted 27 March 2012 - 05:28 PM

Actually this is one of the pitfalls of i18n and where g11n shines!

Each localization should be broken up by language_country instead of just by language.

There are lots of other pitfalls too like first and last name and such. But this topic is for dates :)

#4 David

David

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationAustralia

Posted 27 March 2012 - 09:45 PM

Hi

Specifically Australia would be en_au but most non-US locales would probably be able to work with en_gb (seeing as we all claim some linkage to Great Britain for our language). That'd work for dates, not for currency symbols though, but Zumo handles that elsewhere anyway.

#5 Jason

Jason

    Administrator

  • Administrators
  • 716 posts
  • LocationChicago

Posted 28 March 2012 - 04:16 PM

Ok thanks. I created a pivotal tracker story here:

https://www.pivotalt...y/show/27169745

I will need more about how to solve this.

Jason Green
Zurmo Team
Need support? Upgrade now


#6 David

David

    Newbie

  • Members
  • Pip
  • 6 posts
  • LocationAustralia

Posted 28 March 2012 - 08:37 PM

Ok thanks. Let me know if I can help in any way.

#7 Sacha Telgenhof

Sacha Telgenhof

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts
  • LocationTokyo, Japan

Posted 25 May 2012 - 03:04 PM

Hi David,

Sorry for only getting back to this now, but I have the solution for you. In fact, Zurmo already makes use of locales (based on Yii) and having Zurmo apply the correct regional settings for the "en_au" locale is quite easy!

First of all, make sure you have the latest commits of Zurmo as I added a date format mapping for "en_au" (Commit: 51ed168e8b2f). Then just follow these steps:
  • Add the "en_au" locale as a supported language to your perInstanceConfig.php file.
  • Create a "Default.php" file in the "protected/messages" folder. Just copy one of the other language "Default.php" file in this folder. Inside this file, change the language string to "en_au".
  • Login to Zurmo as a super-user and activate the "en_au" language you have added in Step 1.
  • Change the language setting for any Zurmo user to the new language you have added.
  • Login with the account for which you have made the language change.

That's it! You will now see that date formats are presented like 'DD/MM/YY'. Of course, Zurmo will not be translated in Australian English but will use the base English language. If needed, specific Australian English translation can be added.

Let me know if this works for you.

Cheers! Sacha

#8 petejenkins

petejenkins

    Newbie

  • Members
  • Pip
  • 7 posts
  • LocationUK

Posted 23 April 2013 - 03:09 PM

Hmm, tried this by adding en_gb instead of en_au in the above example. On the plus side this did change the date format to UK format. On the negative side the Calendar widget displays in Chinese or Japanese lettering:

 

zurmokanjidate.jpg

 

Any ideas on what else to tweak to fix this?

 

Cheers, Pete



#9 brisvegan

brisvegan

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 27 April 2013 - 02:21 AM

Sorry to resurrect an old thread but I tried the above process to add "en_au" in Zurmo 1.5.13 but "English (Australian)" is not showing up in the list of languages to activate.

Also while doing this I noticed that in "/protected/messages/" there were initially 4 language folders (de, es, fr and it) but in the Zurmo interface Settings > Languages there are many more listed. Where are these "extra" languages coming from, if not from "/potected/messages/". I guess the configuration process for internationalisation has changed since this original post. Can someone please enlighten me?

I just want to get dates formatted correctly for Australia e.g. DD/MM/YYYY

Maybe the code commit you referred to (51ed168e8b2f) was never rolled into the current stable?



#10 sandro

sandro

    Member

  • Members
  • PipPip
  • 26 posts
  • LocationSanto André, SP, Brasil

Posted 02 May 2013 - 04:48 PM

Hello,

 

I have the same problem, but with the language pt_br. How can I solve this?

 

Thanks

 

Hmm, tried this by adding en_gb instead of en_au in the above example. On the plus side this did change the date format to UK format. On the negative side the Calendar widget displays in Chinese or Japanese lettering:

 

zurmokanjidate.jpg

 

Any ideas on what else to tweak to fix this?

 

Cheers, Pete


Linux2Business - Soluções Livres na Nuvem

http://www.linux2business.com.br


#11 brisvegan

brisvegan

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 09 May 2013 - 02:45 AM

Can anyone comment on this? I'm a bit stuck.

 

Sorry to resurrect an old thread but I tried the above process to add "en_au" in Zurmo 1.5.13 but "English (Australian)" is not showing up in the list of languages to activate.

Also while doing this I noticed that in "/protected/messages/" there were initially 4 language folders (de, es, fr and it) but in the Zurmo interface Settings > Languages there are many more listed. Where are these "extra" languages coming from, if not from "/potected/messages/". I guess the configuration process for internationalisation has changed since this original post. Can someone please enlighten me?

I just want to get dates formatted correctly for Australia e.g. DD/MM/YYYY

Maybe the code commit you referred to (51ed168e8b2f) was never rolled into the current stable?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users