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: <[email protected]>
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