You are not logged in.
Pages: 1
in here i read about a new i18n-system:
http://xinha.gogo.co.nz/cgi-bin/trac.cgi/ticket/17
how will this one work?
i had troubles with the old system, namely in our CMS we use a database-driven-translation-system - i tried to use lang/en.php - but that doesn't work as (i suppose) the php-file takes too long to load...
(currently we just use english...)
so... it would be nice to have a translation-system that i can use with php-scripts....
it would be possible too of course to bring our translations back to xinha...
thanks
Niko
Offline
Thats part of the reason for the new system actually, I didn't want to have the Xinha translations seperate from whatever other translation system (eg gettext) that people were using. Particularly for developers like myself who when it's necessary to do a foreign language job pass of the translation to the client - not need the client to translate things in different ways.
The other reason is that the existing L10n system breaks horribly the instant things get out of sync (when new phrases are added but not translated), what it should do is return the english phrase with a special marker.
Anyway, to answer your question, I havn't fully thought it through yet, but my plan is to have translations passed through a gettext style "_()" function. In addition html dialog files would use l10n tags
<l10n>Some Message</l10n>
which get passed through the _() function for translation. And also attribute translation like
<img alt="_(Some Message)" />
You can see I have started this in the linker dialog (plugins/Linker/dialog.html).
If you have a look in htmlarea.js, search for "_lc", you will see the new functions in a rudimentary form, but they dont' translate yet. HTMLArea._loadlang needs to be filled in, and I'm not sure about the "context" idea, because I'm not sure how to take the context and from that determine where a language file should be loaded from.
Any suggestions are welcome, it's not set in stone or anything, it's not even set in jelly (the wobbly stuff, jello to the merkins) yet so feel free to completely ridicule the idea if it's seems silly.
James Sleeman
Offline
Pages: 1