zend-locale

Is it feasible to rely on setlocale, and rely on locales being installed?

I was trying to generate a localized date string with strftime, the placeholder I use is %x. The language/locale is setlocale(LC_ALL, array('jp','japanese')), however neither locale was available so it generated a string with improper characters. I then installed the ja_JP.utf8 locale and specified that as the first element in the array ...

Strategy for storing and displaying form dropdown data for provinces, states, prefixes?

I'm currently migrating from a class that stores lists of countries, states & provinces in the form of arrays to using Zend's Locale data in the form of ldml xml files. These ldml files provide localised lists of countries, currencies, languages - so I'm not exactly sure where I should store US States, ( Canadian Provinces ), Prefixes - ...

How to convert a country string to its ISO 3166-1 code using Zend?

Does anybody know if it's possible to use Zend_Locale to get the ISO 3166-1 code for a country if you have the country name as a string? For example I have "Nederland" so I would like to get "NL". ...

Using PHPUnit on a Zend Framework application, how can I force the locale to be used for a given test?

I am testing a multi-lingual site with phpunit. One of the tests I want to perform is that the application will detect the locale of the user and automatically redirect. That is, user accesses the site on /. The application detects they're from France and redirects to /fr-FR/ The application does appear to do this, but trying to wri...