Re: [fw-general] Zend_Translate & addTranslation

2009-10-09 Thread Thomas Weidner

As I said before:
I expect that the file 'c:/www/application/languages' does not exist or is 
no CSV file, which is the reason you get this notice.


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

- Original Message - 
From: "ignace" 

To: 
Sent: Friday, October 09, 2009 2:38 PM
Subject: Re: [fw-general] Zend_Translate & addTranslation




I modified my paths to absolute and it cleared a notice I kept getting 
(when

I loaded en it was complaining it couldn't find my (browser) default
language: nl -> No translation found for .. or something)

However it still doesn't load en when I use:

$this->addTranslation('c:/www/application/languages', 'en');

Only when I use:

$this->addTranslation('c:/www/application/languages/en.csv', 'en');

Best regards,
Ignace


thomasW wrote:


I expect that the file "directory" does not exist, whereas the file
"en.csv"
does.

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

- Original Message ----- 
From: "Ignace Knops" 

To: "Thomas Weidner" 
Sent: Friday, October 09, 2009 1:55 PM
Subject: Re: [fw-general] Zend_Translate & addTranslation



Hi,

I have managed to get it working instead of just doing:

$translate->setOptions(array('clear' => true));
$translate->addTranslation('path/to/language/directory', 'en'); //
'path/to/language/directory = contentsof $options['data'], 'en' =>
contentsof $language

I rewrote it to:

$translate->setOptions(array('clear' => true));
$translate->addTranslation('path/to/language/en.csv', 'en'); //
'path/to/language/directory = contentsof $options['data'], 'en' =>
contentsof $language

Any ideas on why this works and the previous doesn't?

Best regards,
Ignace

2009/10/8 Thomas Weidner 


So you are loading always the same directory regardless of what your
user
sends ?
Does not seem to be a correct behaviour in my eyes.

Regarding loading all languages at once, simply look into the manual 
for

the requirements and the needed options.

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

- Original Message - From: "ignace" 


To: 
Sent: Wednesday, October 07, 2009 10:38 PM
Subject: Re: [fw-general] Zend_Translate & addTranslation




Ok the code i used is:

if ($this->_hasParam('language')) {
$language = $this->_getParam('language');
if ($bootstrap = $this->getInvokeArg('bootstrap')) {
$translateResource = $bootstrap->getPluginResource('Translate');
$translate = $translateResource->getTranslate();
if (!$translate->isAvailable($language)) {
$options = $translateResource->getOptions();
try {
$translate->setOptions(array('reload' => true));
$translate->addTranslation($options['data'], $language);
} catch (Zend_Translate_Exception $e) {}
}
// is it now available?
if ($translate->isAvailable($language)) {
$translate->setLocale($language);
}
}
}

Also is it possible for Zend_Translate to read all translation sources
in
the directory instead of one?


thomasW wrote:



You should give some reproducable code from your side instead of code
from
ZF.
Looking at your result you should ask yourself what you are doing 
that

the
"nl" files are read as "en".
Because Zend_Translate has no way to detect for which language the
content
of a file is when the directory or filename does not reflect this.

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

- Original Message - From: "ignace"

To: 
Sent: Wednesday, October 07, 2009 7:42 PM
Subject: [fw-general] Zend_Translate & addTranslation




Hi,

I have a problem: Zend_Translate loads by default the browser's
default
language (in my case nl) Then through a navigation I can alter the
language
in which I want to see the website but it doesn't change it a closer
look
showed that Zend_Translate indeed retrieves the translation source 
as

it
outputs at some point:

'en' => array
  'About us' => 'About us'

'nl' => array
  'About us' => 'Over ons'

But changes it later on to:

'en' => array
  'About us' => 'Over ons'

'nl' => array
  'About us' => 'Over ons'

This process occurs in Zend_Translate_Adapter at lines 499 - 501 in
version
1.10.0dev The lines in question are:

if (array_key_exists($key, $temp) && is_array($temp[$key])) {
  $this->_translate[$key] = $temp[$key] +
$this->_translate[$key];
  }
--
View this message in context:

http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
Sent from the Zend Framework mailing list archive at Nabble.com.







--
View this message in context:
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25793989.html
Sent from the Zend Framework mailing list archive at Nabble.com.







--
Met vriendelijke groeten,
Ignace Knops







--
View this message in context: 
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25820404.html
Sent from the Zend Framework mailing list archive at Nabble.com. 




Re: [fw-general] Zend_Translate & addTranslation

2009-10-09 Thread ignace

I modified my paths to absolute and it cleared a notice I kept getting (when
I loaded en it was complaining it couldn't find my (browser) default
language: nl -> No translation found for .. or something)

However it still doesn't load en when I use:

$this->addTranslation('c:/www/application/languages', 'en');

Only when I use:

$this->addTranslation('c:/www/application/languages/en.csv', 'en');

Best regards,
Ignace


thomasW wrote:
> 
> I expect that the file "directory" does not exist, whereas the file
> "en.csv" 
> does.
> 
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
> 
> - Original Message ----- 
> From: "Ignace Knops" 
> To: "Thomas Weidner" 
> Sent: Friday, October 09, 2009 1:55 PM
> Subject: Re: [fw-general] Zend_Translate & addTranslation
> 
> 
>> Hi,
>>
>> I have managed to get it working instead of just doing:
>>
>> $translate->setOptions(array('clear' => true));
>> $translate->addTranslation('path/to/language/directory', 'en'); //
>> 'path/to/language/directory = contentsof $options['data'], 'en' =>
>> contentsof $language
>>
>> I rewrote it to:
>>
>> $translate->setOptions(array('clear' => true));
>> $translate->addTranslation('path/to/language/en.csv', 'en'); //
>> 'path/to/language/directory = contentsof $options['data'], 'en' =>
>> contentsof $language
>>
>> Any ideas on why this works and the previous doesn't?
>>
>> Best regards,
>> Ignace
>>
>> 2009/10/8 Thomas Weidner 
>>
>>> So you are loading always the same directory regardless of what your
>>> user
>>> sends ?
>>> Does not seem to be a correct behaviour in my eyes.
>>>
>>> Regarding loading all languages at once, simply look into the manual for
>>> the requirements and the needed options.
>>>
>>> Greetings
>>> Thomas Weidner, I18N Team Leader, Zend Framework
>>> http://www.thomasweidner.com
>>>
>>> - Original Message - From: "ignace" 
>>> To: 
>>> Sent: Wednesday, October 07, 2009 10:38 PM
>>> Subject: Re: [fw-general] Zend_Translate & addTranslation
>>>
>>>
>>>
>>>> Ok the code i used is:
>>>>
>>>> if ($this->_hasParam('language')) {
>>>> $language = $this->_getParam('language');
>>>> if ($bootstrap = $this->getInvokeArg('bootstrap')) {
>>>> $translateResource = $bootstrap->getPluginResource('Translate');
>>>> $translate = $translateResource->getTranslate();
>>>> if (!$translate->isAvailable($language)) {
>>>> $options = $translateResource->getOptions();
>>>> try {
>>>> $translate->setOptions(array('reload' => true));
>>>> $translate->addTranslation($options['data'], $language);
>>>> } catch (Zend_Translate_Exception $e) {}
>>>> }
>>>> // is it now available?
>>>> if ($translate->isAvailable($language)) {
>>>> $translate->setLocale($language);
>>>> }
>>>> }
>>>> }
>>>>
>>>> Also is it possible for Zend_Translate to read all translation sources 
>>>> in
>>>> the directory instead of one?
>>>>
>>>>
>>>> thomasW wrote:
>>>>
>>>>>
>>>>> You should give some reproducable code from your side instead of code
>>>>> from
>>>>> ZF.
>>>>> Looking at your result you should ask yourself what you are doing that
>>>>> the
>>>>> "nl" files are read as "en".
>>>>> Because Zend_Translate has no way to detect for which language the
>>>>> content
>>>>> of a file is when the directory or filename does not reflect this.
>>>>>
>>>>> Greetings
>>>>> Thomas Weidner, I18N Team Leader, Zend Framework
>>>>> http://www.thomasweidner.com
>>>>>
>>>>> - Original Message - From: "ignace" 
>>>>> 
>>>>> To: 
>>>>> Sent: Wednesday, October 07, 2009 7:42 PM
>>>>> Subject: [fw-general] Zend_Translate & addTranslation
>>>>>
>>

Re: [fw-general] Zend_Translate & addTranslation

2009-10-09 Thread ignace

How is that possible as it loads the default language from that directory I
just retrieve it back from my bootstrap resource and append $language.csv?

Best regards,
Ignace


thomasW wrote:
> 
> I expect that the file "directory" does not exist, whereas the file
> "en.csv" 
> does.
> 
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
> 
> - Original Message - 
> From: "Ignace Knops" 
> To: "Thomas Weidner" 
> Sent: Friday, October 09, 2009 1:55 PM
> Subject: Re: [fw-general] Zend_Translate & addTranslation
> 
> 
>> Hi,
>>
>> I have managed to get it working instead of just doing:
>>
>> $translate->setOptions(array('clear' => true));
>> $translate->addTranslation('path/to/language/directory', 'en'); //
>> 'path/to/language/directory = contentsof $options['data'], 'en' =>
>> contentsof $language
>>
>> I rewrote it to:
>>
>> $translate->setOptions(array('clear' => true));
>> $translate->addTranslation('path/to/language/en.csv', 'en'); //
>> 'path/to/language/directory = contentsof $options['data'], 'en' =>
>> contentsof $language
>>
>> Any ideas on why this works and the previous doesn't?
>>
>> Best regards,
>> Ignace
>>
>> 2009/10/8 Thomas Weidner 
>>
>>> So you are loading always the same directory regardless of what your
>>> user
>>> sends ?
>>> Does not seem to be a correct behaviour in my eyes.
>>>
>>> Regarding loading all languages at once, simply look into the manual for
>>> the requirements and the needed options.
>>>
>>> Greetings
>>> Thomas Weidner, I18N Team Leader, Zend Framework
>>> http://www.thomasweidner.com
>>>
>>> - Original Message - From: "ignace" 
>>> To: 
>>> Sent: Wednesday, October 07, 2009 10:38 PM
>>> Subject: Re: [fw-general] Zend_Translate & addTranslation
>>>
>>>
>>>
>>>> Ok the code i used is:
>>>>
>>>> if ($this->_hasParam('language')) {
>>>> $language = $this->_getParam('language');
>>>> if ($bootstrap = $this->getInvokeArg('bootstrap')) {
>>>> $translateResource = $bootstrap->getPluginResource('Translate');
>>>> $translate = $translateResource->getTranslate();
>>>> if (!$translate->isAvailable($language)) {
>>>> $options = $translateResource->getOptions();
>>>> try {
>>>> $translate->setOptions(array('reload' => true));
>>>> $translate->addTranslation($options['data'], $language);
>>>> } catch (Zend_Translate_Exception $e) {}
>>>> }
>>>> // is it now available?
>>>> if ($translate->isAvailable($language)) {
>>>> $translate->setLocale($language);
>>>> }
>>>> }
>>>> }
>>>>
>>>> Also is it possible for Zend_Translate to read all translation sources 
>>>> in
>>>> the directory instead of one?
>>>>
>>>>
>>>> thomasW wrote:
>>>>
>>>>>
>>>>> You should give some reproducable code from your side instead of code
>>>>> from
>>>>> ZF.
>>>>> Looking at your result you should ask yourself what you are doing that
>>>>> the
>>>>> "nl" files are read as "en".
>>>>> Because Zend_Translate has no way to detect for which language the
>>>>> content
>>>>> of a file is when the directory or filename does not reflect this.
>>>>>
>>>>> Greetings
>>>>> Thomas Weidner, I18N Team Leader, Zend Framework
>>>>> http://www.thomasweidner.com
>>>>>
>>>>> - Original Message - From: "ignace" 
>>>>> 
>>>>> To: 
>>>>> Sent: Wednesday, October 07, 2009 7:42 PM
>>>>> Subject: [fw-general] Zend_Translate & addTranslation
>>>>>
>>>>>
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I have a problem: Zend_Translate loads by default the browser's 
>>>>>> default
>>>>>> language (in my case nl) Then through a navigation I can alte

Re: [fw-general] Zend_Translate & addTranslation

2009-10-09 Thread Thomas Weidner
I expect that the file "directory" does not exist, whereas the file "en.csv" 
does.


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

- Original Message - 
From: "Ignace Knops" 

To: "Thomas Weidner" 
Sent: Friday, October 09, 2009 1:55 PM
Subject: Re: [fw-general] Zend_Translate & addTranslation



Hi,

I have managed to get it working instead of just doing:

$translate->setOptions(array('clear' => true));
$translate->addTranslation('path/to/language/directory', 'en'); //
'path/to/language/directory = contentsof $options['data'], 'en' =>
contentsof $language

I rewrote it to:

$translate->setOptions(array('clear' => true));
$translate->addTranslation('path/to/language/en.csv', 'en'); //
'path/to/language/directory = contentsof $options['data'], 'en' =>
contentsof $language

Any ideas on why this works and the previous doesn't?

Best regards,
Ignace

2009/10/8 Thomas Weidner 


So you are loading always the same directory regardless of what your user
sends ?
Does not seem to be a correct behaviour in my eyes.

Regarding loading all languages at once, simply look into the manual for
the requirements and the needed options.

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

- Original Message - From: "ignace" 
To: 
Sent: Wednesday, October 07, 2009 10:38 PM
Subject: Re: [fw-general] Zend_Translate & addTranslation




Ok the code i used is:

if ($this->_hasParam('language')) {
$language = $this->_getParam('language');
if ($bootstrap = $this->getInvokeArg('bootstrap')) {
$translateResource = $bootstrap->getPluginResource('Translate');
$translate = $translateResource->getTranslate();
if (!$translate->isAvailable($language)) {
$options = $translateResource->getOptions();
try {
$translate->setOptions(array('reload' => true));
$translate->addTranslation($options['data'], $language);
} catch (Zend_Translate_Exception $e) {}
}
// is it now available?
if ($translate->isAvailable($language)) {
$translate->setLocale($language);
}
}
}

Also is it possible for Zend_Translate to read all translation sources 
in

the directory instead of one?


thomasW wrote:



You should give some reproducable code from your side instead of code
from
ZF.
Looking at your result you should ask yourself what you are doing that
the
"nl" files are read as "en".
Because Zend_Translate has no way to detect for which language the
content
of a file is when the directory or filename does not reflect this.

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

- Original Message - From: "ignace" 


To: 
Sent: Wednesday, October 07, 2009 7:42 PM
Subject: [fw-general] Zend_Translate & addTranslation




Hi,

I have a problem: Zend_Translate loads by default the browser's 
default

language (in my case nl) Then through a navigation I can alter the
language
in which I want to see the website but it doesn't change it a closer
look
showed that Zend_Translate indeed retrieves the translation source as 
it

outputs at some point:

'en' => array
  'About us' => 'About us'

'nl' => array
  'About us' => 'Over ons'

But changes it later on to:

'en' => array
  'About us' => 'Over ons'

'nl' => array
  'About us' => 'Over ons'

This process occurs in Zend_Translate_Adapter at lines 499 - 501 in
version
1.10.0dev The lines in question are:

if (array_key_exists($key, $temp) && is_array($temp[$key])) {
  $this->_translate[$key] = $temp[$key] +
$this->_translate[$key];
  }
--
View this message in context:

http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
Sent from the Zend Framework mailing list archive at Nabble.com.







--
View this message in context:
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25793989.html
Sent from the Zend Framework mailing list archive at Nabble.com.







--
Met vriendelijke groeten,
Ignace Knops





Re: [fw-general] Zend_Translate & addTranslation

2009-10-08 Thread ignace

I use Zend_Application and my Bootstrap class is currently empty
Zend_Translate is initialized through the config

resources.translate.data = APPLICATION_PATH "/path/to/translation"
resources.translate.adapter = "csv"

Best Regards,
Ignace


umpirsky wrote:
> 
> How do you initialize Zend_Translate in your bootstrap?
> 
> Regards,
> Saša Stamenković
> 
> 
> On Wed, Oct 7, 2009 at 10:38 PM, ignace 
> wrote:
> 
>>
>> Ok the code i used is:
>>
>> if ($this->_hasParam('language')) {
>>$language = $this->_getParam('language');
>>if ($bootstrap = $this->getInvokeArg('bootstrap'))
>> {
>>$translateResource =
>> $bootstrap->getPluginResource('Translate');
>>$translate =
>> $translateResource->getTranslate();
>>if (!$translate->isAvailable($language)) {
>>$options =
>> $translateResource->getOptions();
>>try {
>>
>>  $translate->setOptions(array('reload' => true));
>>
>>  $translate->addTranslation($options['data'], $language);
>>} catch (Zend_Translate_Exception
>> $e) {}
>>}
>>// is it now available?
>>if ($translate->isAvailable($language)) {
>>$translate->setLocale($language);
>>}
>>}
>>}
>>
>> Also is it possible for Zend_Translate to read all translation sources in
>> the directory instead of one?
>>
>>
>> thomasW wrote:
>> >
>> > You should give some reproducable code from your side instead of code
>> from
>> > ZF.
>> > Looking at your result you should ask yourself what you are doing that
>> the
>> > "nl" files are read as "en".
>> > Because Zend_Translate has no way to detect for which language the
>> content
>> > of a file is when the directory or filename does not reflect this.
>> >
>> > Greetings
>> > Thomas Weidner, I18N Team Leader, Zend Framework
>> > http://www.thomasweidner.com
>> >
>> > - Original Message -
>> > From: "ignace" 
>> > To: 
>> > Sent: Wednesday, October 07, 2009 7:42 PM
>> > Subject: [fw-general] Zend_Translate & addTranslation
>> >
>> >
>> >>
>> >> Hi,
>> >>
>> >> I have a problem: Zend_Translate loads by default the browser's
>> default
>> >> language (in my case nl) Then through a navigation I can alter the
>> >> language
>> >> in which I want to see the website but it doesn't change it a closer
>> look
>> >> showed that Zend_Translate indeed retrieves the translation source as
>> it
>> >> outputs at some point:
>> >>
>> >> 'en' => array
>> >>'About us' => 'About us'
>> >>
>> >> 'nl' => array
>> >>'About us' => 'Over ons'
>> >>
>> >> But changes it later on to:
>> >>
>> >> 'en' => array
>> >>'About us' => 'Over ons'
>> >>
>> >> 'nl' => array
>> >>'About us' => 'Over ons'
>> >>
>> >> This process occurs in Zend_Translate_Adapter at lines 499 - 501 in
>> >> version
>> >> 1.10.0dev The lines in question are:
>> >>
>> >> if (array_key_exists($key, $temp) && is_array($temp[$key])) {
>> >>$this->_translate[$key] = $temp[$key] +
>> >> $this->_translate[$key];
>> >>}
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
>> >> Sent from the Zend Framework mailing list archive at Nabble.com.
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25793989.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25799363.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Translate & addTranslation

2009-10-07 Thread Саша Стаменковић
How do you initialize Zend_Translate in your bootstrap?

Regards,
Saša Stamenković


On Wed, Oct 7, 2009 at 10:38 PM, ignace  wrote:

>
> Ok the code i used is:
>
> if ($this->_hasParam('language')) {
>$language = $this->_getParam('language');
>if ($bootstrap = $this->getInvokeArg('bootstrap')) {
>$translateResource =
> $bootstrap->getPluginResource('Translate');
>$translate =
> $translateResource->getTranslate();
>if (!$translate->isAvailable($language)) {
>$options =
> $translateResource->getOptions();
>try {
>
>  $translate->setOptions(array('reload' => true));
>
>  $translate->addTranslation($options['data'], $language);
>} catch (Zend_Translate_Exception
> $e) {}
>}
>// is it now available?
>if ($translate->isAvailable($language)) {
>$translate->setLocale($language);
>}
>}
>}
>
> Also is it possible for Zend_Translate to read all translation sources in
> the directory instead of one?
>
>
> thomasW wrote:
> >
> > You should give some reproducable code from your side instead of code
> from
> > ZF.
> > Looking at your result you should ask yourself what you are doing that
> the
> > "nl" files are read as "en".
> > Because Zend_Translate has no way to detect for which language the
> content
> > of a file is when the directory or filename does not reflect this.
> >
> > Greetings
> > Thomas Weidner, I18N Team Leader, Zend Framework
> > http://www.thomasweidner.com
> >
> > - Original Message -
> > From: "ignace" 
> > To: 
> > Sent: Wednesday, October 07, 2009 7:42 PM
> > Subject: [fw-general] Zend_Translate & addTranslation
> >
> >
> >>
> >> Hi,
> >>
> >> I have a problem: Zend_Translate loads by default the browser's default
> >> language (in my case nl) Then through a navigation I can alter the
> >> language
> >> in which I want to see the website but it doesn't change it a closer
> look
> >> showed that Zend_Translate indeed retrieves the translation source as it
> >> outputs at some point:
> >>
> >> 'en' => array
> >>'About us' => 'About us'
> >>
> >> 'nl' => array
> >>'About us' => 'Over ons'
> >>
> >> But changes it later on to:
> >>
> >> 'en' => array
> >>'About us' => 'Over ons'
> >>
> >> 'nl' => array
> >>'About us' => 'Over ons'
> >>
> >> This process occurs in Zend_Translate_Adapter at lines 499 - 501 in
> >> version
> >> 1.10.0dev The lines in question are:
> >>
> >> if (array_key_exists($key, $temp) && is_array($temp[$key])) {
> >>$this->_translate[$key] = $temp[$key] +
> >> $this->_translate[$key];
> >>}
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25793989.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] Zend_Translate & addTranslation

2009-10-07 Thread ignace

Ok the code i used is:

if ($this->_hasParam('language')) {
$language = $this->_getParam('language');
if ($bootstrap = $this->getInvokeArg('bootstrap')) {
$translateResource = 
$bootstrap->getPluginResource('Translate');
$translate = $translateResource->getTranslate();
if (!$translate->isAvailable($language)) {
$options = 
$translateResource->getOptions();
try {

$translate->setOptions(array('reload' => true));

$translate->addTranslation($options['data'], $language);
} catch (Zend_Translate_Exception $e) {}
}
// is it now available?
if ($translate->isAvailable($language)) {
$translate->setLocale($language);
}
}
}

Also is it possible for Zend_Translate to read all translation sources in
the directory instead of one?


thomasW wrote:
> 
> You should give some reproducable code from your side instead of code from 
> ZF.
> Looking at your result you should ask yourself what you are doing that the 
> "nl" files are read as "en".
> Because Zend_Translate has no way to detect for which language the content 
> of a file is when the directory or filename does not reflect this.
> 
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
> 
> - Original Message - 
> From: "ignace" 
> To: 
> Sent: Wednesday, October 07, 2009 7:42 PM
> Subject: [fw-general] Zend_Translate & addTranslation
> 
> 
>>
>> Hi,
>>
>> I have a problem: Zend_Translate loads by default the browser's default
>> language (in my case nl) Then through a navigation I can alter the 
>> language
>> in which I want to see the website but it doesn't change it a closer look
>> showed that Zend_Translate indeed retrieves the translation source as it
>> outputs at some point:
>>
>> 'en' => array
>>'About us' => 'About us'
>>
>> 'nl' => array
>>'About us' => 'Over ons'
>>
>> But changes it later on to:
>>
>> 'en' => array
>>'About us' => 'Over ons'
>>
>> 'nl' => array
>>'About us' => 'Over ons'
>>
>> This process occurs in Zend_Translate_Adapter at lines 499 - 501 in 
>> version
>> 1.10.0dev The lines in question are:
>>
>> if (array_key_exists($key, $temp) && is_array($temp[$key])) {
>>$this->_translate[$key] = $temp[$key] +
>> $this->_translate[$key];
>>}
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
>> Sent from the Zend Framework mailing list archive at Nabble.com. 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25793989.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Translate & addTranslation

2009-10-07 Thread Thomas Weidner
You should give some reproducable code from your side instead of code from 
ZF.
Looking at your result you should ask yourself what you are doing that the 
"nl" files are read as "en".
Because Zend_Translate has no way to detect for which language the content 
of a file is when the directory or filename does not reflect this.


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

- Original Message - 
From: "ignace" 

To: 
Sent: Wednesday, October 07, 2009 7:42 PM
Subject: [fw-general] Zend_Translate & addTranslation




Hi,

I have a problem: Zend_Translate loads by default the browser's default
language (in my case nl) Then through a navigation I can alter the 
language

in which I want to see the website but it doesn't change it a closer look
showed that Zend_Translate indeed retrieves the translation source as it
outputs at some point:

'en' => array
   'About us' => 'About us'

'nl' => array
   'About us' => 'Over ons'

But changes it later on to:

'en' => array
   'About us' => 'Over ons'

'nl' => array
   'About us' => 'Over ons'

This process occurs in Zend_Translate_Adapter at lines 499 - 501 in 
version

1.10.0dev The lines in question are:

if (array_key_exists($key, $temp) && is_array($temp[$key])) {
   $this->_translate[$key] = $temp[$key] +
$this->_translate[$key];
   }
--
View this message in context: 
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
Sent from the Zend Framework mailing list archive at Nabble.com. 




[fw-general] Zend_Translate & addTranslation

2009-10-07 Thread ignace

Hi,

I have a problem: Zend_Translate loads by default the browser's default
language (in my case nl) Then through a navigation I can alter the language
in which I want to see the website but it doesn't change it a closer look
showed that Zend_Translate indeed retrieves the translation source as it
outputs at some point:

'en' => array
'About us' => 'About us'

'nl' => array
'About us' => 'Over ons'

But changes it later on to:

'en' => array
'About us' => 'Over ons'

'nl' => array
'About us' => 'Over ons'

This process occurs in Zend_Translate_Adapter at lines 499 - 501 in version
1.10.0dev The lines in question are:

if (array_key_exists($key, $temp) && is_array($temp[$key])) {
$this->_translate[$key] = $temp[$key] +
$this->_translate[$key];
}
-- 
View this message in context: 
http://www.nabble.com/Zend_Translate---addTranslation-tp25791169p25791169.html
Sent from the Zend Framework mailing list archive at Nabble.com.