When you only have the territory or country then it's also possible to get a locale
from that information. You can manually search if there is a locale for this territory
getLocaleToTerritory(). This method returns a
locale for the given territory or
NULL when there was has no locale
Example 554. getLocaleToTerritory
$locale = Zend_Locale::getLocaleToTerritory('US');
// returns 'en_US'
When you know that you are using a territory, then you should uppercase it.
Otherwise you could get an in your eyes false locale in return when you use other
methods. For example: When you give "om" then
getLocaleToTerritory() returns you "ar_OM" as it knows that
you mean a territory. But all other methods will return "om", as it's also a
So when you know that the given string is a territory, eighter use
getLocaleToTerritory() yourself before creating a locale,
or uppercase the input.