ZF-6782: use of Zend_Locale in Zend_Translate

Issue Type: Improvement Created: 2009-05-22T09:34:00.000+0000 Last Updated: 2009-05-22T10:13:58.000+0000 Status: Resolved Fix version(s): - 1.8.2 (27/May/09)

Reporter: Ionut Dinu (tunder) Assignee: Thomas Weidner (thomas) Tags: - Zend_Translate

Related issues: Attachments:



is not equal with


if, let's say, I want to define ONLY 'en' or 'en_US', which, in my opinion, is the same.

To have Zend_Translate understand both locales, I have to duplicate the translations for both locales. This is not an option in case of large translations files on large projects.

Suggestion: use only the language part of the locale or, even better, if the locale have an exact match in the translation arrays use it, else use only the language part of locale.


Posted by Thomas Weidner (thomas) on 2009-05-22T10:13:00.000+0000

Of course they are not equal.

You have to keep in mind that languages differ per region. Brittish english is not american english.

And many bigger sites support both.

So simple as is: When you support only one english dialect use "en". But when you also support other dialects then use full locales.

Note: According to the manual the locale "en_US" is automatically degraded to "en" when "en_US" is not available. This is no fault, this is expected I18N behaviour and not ZF specific.

Posted by Thomas Weidner (thomas) on 2009-05-22T10:13:58.000+0000

Closing as non-issue. Please read the manual for details about how I18N works with translation and degrading.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.