views:

12

answers:

1

hi

i have a registration form which contains a postalcode and a country drop down given those two values i want to validate the postcode via zend_validate_postcode

this validator wants a zend_locale in the constructor now i dont know how to create a zend_locale only ba a given country which means i would have to create from an US user new Zend_Locale('en_US'); or swiss de_CH but i only have the country part of this locale, how do i get the language part for a country?

thx

A: 

Zend_Locale::getLocaleToTerritory($country) e.g returns 'en_US' for country US or. de_CH for CH

John Doe