I am with Ian. There are a lot of things I envision doing with Zend_Locale
but most of the examples are not useful.
I know the Timezone list is incomplete but I get a useless list.
The list:
St. John’s
Paris
Dublin
Jerusalem
Tokyo
Bucharest
Singapore
does not look anything like a timezone selection. See
http://unicode.org/cldr/data/diff/supplemental/windows_tzid.html
Well, when I am requesting the timezones for a locale I get an array where
the key is the timezone and the value is the translated name for this
timezone.
I dont know from where you have your list but this is not from Zend_Locale.
<?php
print "<pre>";
require_once 'Zend/Locale.php';
$locale = new Zend_Locale('de_AT');
$list = $locale->getTranslationList("timezone");
print_r ($list);
Any my result is :
Array
(
[Antarctica/South_Pole] => Südpol
[Antarctica/Vostok] => Wostok
[America/St_Johns] => St. John's
[Pacific/Easter] => Osterinsel
[Europe/Berlin] => Berlin
[Atlantic/Canary] => Kanaren
[Asia/Ulaanbaatar] => Ulan-Bator
[America/Mexico_City] => Mexiko-Stadt
[Atlantic/Azores] => Azoren
[Europe/Lisbon] => Lissabon
[Europe/Moscow] => Moskau
[Asia/Yekaterinburg] => Jekaterinburg
[Asia/Novosibirsk] => Nowosibirsk
[Asia/Krasnoyarsk] => Krasnojarsk
[Asia/Yakutsk] => Jakutsk
[Asia/Vladivostok] => Wladiwostok
[Asia/Sakhalin] => Sachalin
[Asia/Kamchatka] => Kamtschatka
[Europe/Uzhgorod] => Uschgorod
[Europe/Kiev] => Kiew
[Europe/Zaporozhye] => Saporischja
[Asia/Tashkent] => Taschkent
)
This are the known timezones for the given locale (de_AT in my example)
And the key is identical to the timezones which are known by php.
I have been bouncing back to this Timezone issue for the last month
thinking
it was me. In the documentation some of the examples don't work and I am
using Zend Framework RC1.
The examples at
http://framework.zend.com/manual/en/zend.locale.functions.html I am
referring to are as follows:
- Under Example 18.15., Similarly, getCountryTranslationList() and
getRegionDisplay() could be used to create a table mapping your native
language names for regions to the names of the regions shown in another
language
- Example 18.16. All Languages written in their native language
getRegionDisplay() and getLanguageDisplay() don't even exist ... see
http://framework.zend.com/apidoc/core/Zend_Locale/Zend_Locale.html#sec-method-summary
I never said that I am perfect, did I ?
Even me is not reading the docu every day.
And I am not paid for doing this work for the Zend Framework, so please do
not being
angry when my work takes some time and is in need of feedback if something
is wrong.
We are only as good as the response to us.
Another simple thing I want to create is a list of the language/territory
abbreviations and their full names.
What do you mean with language and territory abbreviations ???
german is always german and can not be abbreviated to ger or something
else...
And Austria is always austria...
There are no abbreviations for languages and territorries.
A list of full names is no problem...
Just take a look at getTranslationList();
Greetings
Thomas
I18N Team Leader