Thomas,

The nl (not nl_NL) translations are in the source file:

<?xml version="1.0" encoding="UTF-8"?>
<tmx version="2.0" xmlns="http://www.lisa.org/tmx20";>
  <header adminlang="en" creationtool="locale4j" creationtoolversion="1.1"
o-tmf="unknown" segtype="block" srclang="*all*"/>
  <body>
    <tu tuid="Add">
      <tuv xml:lang="nl">
        <seg>Toevoegen</seg>
      </tuv>
      <tuv xml:lang="en">
        <seg>Add</seg>
      </tuv>
    </tu>

I'm trying to autohandle the languages, so I'm especially interested in your
remark about "The locale parameter is ignored for sourcefiles which define
there locale themself".

What does that actually mean? That I can't autohandle the language? From the
manual I read:

" TMX files can have several languages within the same file. All other
included languages are added automatically, so you do not have to call
addLanguage()."

Shouldn't nl_NL downgrade to nl and therefore the language is autohandled
and fetched when translating?

Regards, TJ.



On Fri, Sep 5, 2008 at 7:29 PM, Thomas Weidner <[EMAIL PROTECTED]>wrote:

> Simply said, you wanted to change the language to a language where no
> translation is available at all.
> It seems that you have only empty 'nl_NL' files and wanted to
> setLocale('nl_NL');
>
> This has nothing to do with downgrading. Downgrading does work and is
> always done when translating.
> But you can not set a language where you have not added translations before
> as then there would nothing be there to downgrade to.
>
> And beware: The TMX format defines the language within the source file. The
> locale parameter is ignored for sourcefiles which define there locale
> themself.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>
> ----- Original Message ----- From: "Codiac" <[EMAIL PROTECTED]>
> To: <fw-general@lists.zend.com>
> Sent: Friday, September 05, 2008 5:00 PM
> Subject: [fw-general] Zend_Translate TMX doesn't downgrade?
>
>
>
>
>> Hi all,
>>
>> I've switched from a CSV file to using TMX for my translations, but it
>> seems
>> there's a problem with the TMX adapter. According to the manual, if a
>> language can't be found it downgrades the language code (without the
>> region). However I get the following message, even with language 'nl' in
>> my
>> TMX file:
>>
>> Fatal error: Uncaught exception 'Zend_Translate_Exception' with message
>> 'No
>> translation for the language 'nl_NL' available.'
>>
>> This is in my bootstrap:
>>
>> $locale = new Zend_Locale();
>> self::$registry->Zend_Locale = $locale;
>>
>> $translate = new Zend_Translate('tmx', self::$basepath . '/languages');
>> self::$registry->Zend_Translate = $translate;
>>
>>
>> However, if I adjust the following line:
>> $translate = new Zend_Translate('tmx', self::$basepath . '/languages',
>> 'nl');
>>
>> Everything works fine. Can someone verify if this is a bug?
>>
>> Regards, TJ.
>> --
>> View this message in context:
>> http://www.nabble.com/Zend_Translate-TMX-doesn%27t-downgrade--tp19333160p19333160.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>
>

Reply via email to