Zend_Translate & TMX adapter — Source language strings as id

Thomas Wei­d­ner describes some addi­tional func­tion­al­ity only avail­able from Zend Frame­work 1.10.2+ and for­ward, for those of us that do *not* wish to use a sep­a­rate mes­sage id/key but rather the source lan­guage string in the source code.

Set the “useId” option to false.
In this case the source lan­guage is used as mes­sage key and the source must be set as first translation.


adminlang=“en-us” srclang=“de-at” o-tmf=“abc“
creationtool=“XYZTool” >



Nachricht 1
mes­sage 1


Note the ‘useId’ => false below;

$translate = new Zend_Translate('tmx', $file, $locale, array('useId' => false));

Then “Nachricht 1″ will be used as mes­sage key instead of “0001″.
Note that this works only as with 1.10.2 (or trunk as of today).

Tags: , ,

Leave a Comment

*

Get Adobe Flash playerPlugin by wpburn.com wordpress themes