0

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

Charles
  • 50,943
  • 13
  • 104
  • 142
John Doe
  • 2,746
  • 2
  • 35
  • 50

1 Answers1

1

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

John Doe
  • 2,746
  • 2
  • 35
  • 50