[PHPTAL] Re: PHPTAL Digest, Vol 29, Issue 4

lbedubourg lbedubourg at motion-twin.com
Fri Jul 20 08:40:30 CEST 2007


deirathe elf wrote:
> Thanks for all.
> I met enemy again :P.
> I made myself a translation service and have a next stupid quetion to my 
> coolection.
> How can i left the tag value in case translator couldnt find a 
> translation? I was trying to find out solution by myself but it ends 
> without any results. My tag:
> <td class="loginHead" i18n:translate="string:login">Login</td>
> Am i suppouse to put something in tag or translation service class?
> 

You can omit the translation key and i18n will use the tag content as a 
key, if no translation is associated with this key gettext will returns 
the key and thus the original version.

<td class="loginHead" i18n:translate="">Login</td>

msgId "Login"
msgStr "Spaghetti"

I also wrote some C++ tools for I18N :

https://svn.motion-twin.com/phptal/phptal_i18n/trunk/cpp/

- translation extractor : create .pot files from templates
- translation todo : tells you what have to be translated in a .po file
- translation merger : update .po files using modified .pot file
- translation builder (creates a new translated template stripping i18n 
attributes using a gettext translation file and your source template)

Best regards
Laurent



More information about the PHPTAL mailing list