Menu

i18n 1.045 released

1)
It is now possible to include more than one translation file if you use modus "inc" or "gettext". To include more that one file write $object = new Translator('language','file1,file2,...'); when creating a new translation object.

Due the limitations of gettext you have to add the name of the language file where a translation-string can be found as a 2nd value when you use the _() function. But with the exeption, if the string is in the first file of the language file list, you don't have to include the filename. Example:

So let's say your first string "string1" can be found in "file1.po" and "string2" can be found in "file2.po".
First create a new object: $object = new Translator('language','file1,file2');

Then translate the first string with _('string1')

and the second string with _('string2','file2')

Since string1 is located in file1 - which is the first file in the filelist given as a value to the Translator class when creating the object - you don't have to add the filename every time you want to translate string1, but since string2 is located in another file you have to add the filename as a 2nd argument to the translate function.
For more information on that complicated topic, take a look at the user comments at http://www.php.net/manual/en/ref.gettext.php

2)
Added a MiddleDate function, but only added german format so far.

3)
All settings from the user class are now located in the i18n_settings.ini file

4)
Added a simple script to convert translation files to the mysql translation table

Posted by flaimo 2003-02-22

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.