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
by using getLocaleToTerritory(). This method returns a
locale for the given territory or NULL when there was has no locale
been found.
Example 537. getLocaleToTerritory
<?php
$locale = Zend_Locale::getLocaleToTerritory('US');
// returns 'en_US'
Uppercase territories
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
language.
So when you know that the given string is a territory, eighter use
getLocaleToTerritory() yourself before creating a locale,
or uppercase the input.




