getTranslationList application wide locale

2 messages Options
Embed this post
Permalink
Skorp

getTranslationList application wide locale

Reply Threaded More More options
Print post
Permalink
Hi guys,
can someone tell me why this doesn't work?
bootstrap:

$locale = new Zend_Locale('tr_TR');
Zend_Registry::set('Zend_Locale',$locale);

-----
i also tryed:
$locale = new Zend_Locale();
$locale->setDefault('tr_TR');
$locale->setLocale('tr_TR');
-----

form

$this->_locale = Zend_Registry::get('Zend_Locale');
$this->_locale->getTranslationList('month')


i want to get monts in turkish, but i get it in german?

when i write: $this->_locale->getTranslationList('month','tr') then it works,

i won't add the ssecond parameter to the second line, but when i use the application in another languge/locale i must edit this anywhere this is not nice,
is there any other solution?

regars
thomasW

Re: getTranslationList application wide locale

Reply Threaded More More options
Print post
Permalink
You should note that according to API the method "getTranslationList()" is
STATIC.
This means it has no access to any instance parameters.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message -----
From: "skorp" <[hidden email]>
To: <[hidden email]>
Sent: Friday, April 10, 2009 11:16 AM
Subject: [fw-i18n] getTranslationList application wide locale


>
> Hi guys,
> can someone tell me why this doesn't work?
> bootstrap:
>
> $locale = new Zend_Locale('tr_TR');
> Zend_Registry::set('Zend_Locale',$locale);
>
> -----
> i also tryed:
> $locale = new Zend_Locale();
> $locale->setDefault('tr_TR');
> $locale->setLocale('tr_TR');
> -----
>
> form
>
> $this->_locale = Zend_Registry::get('Zend_Locale');
> $this->_locale->getTranslationList('month')
>
>
> i want to get monts in turkish, but i get it in german?
>
> when i write: $this->_locale->getTranslationList('month','tr') then it
> works,
>
> i won't add the ssecond parameter to the second line, but when i use the
> application in another languge/locale i must edit this anywhere this is
> not
> nice,
> is there any other solution?
>
> regars
> --
> View this message in context:
> http://www.nabble.com/getTranslationList-application-wide-locale-tp22985327p22985327.html
> Sent from the Zend I18N/Locale mailing list archive at Nabble.com.