[geeklog-devel] Translations

Tony Bibbs tony at tonybibbs.com
Fri Apr 11 16:59:42 EDT 2003


WIth help from Dirk I have a near complete translation library.  Here are 
features:

1) No need to maintain a language file in default language.  So, assuming 
English for Geeklog 2, we will not need to maintain a language file.  This 
is because when writing your code you will now have this way of 
translating:
$translator->translate('some english string');
Since english will be the default, the translate() method will be smart 
enough to simply return what it was given requireing no file I/O

2) After writing code, developers (includign module developers) can run a 
script called getstrings which will parse all PHP code files and take all 
strings in calls to translate() and create an en.xml file.  This XML file 
is then emailed to translators via the geeklog-translations mailing list.
Translators then add their translations and send back to developers.

3) When updates occur, a second script called mergeversions aids 
translators by taking any valid string in their old translated file and 
adds them to the new translation file.  From there the translators only 
add new entries saving considerably on time (thanks to Dirk for the idea)

Questions, comments?

-- 
Tony Bibbs          "I guess you have to remember that those who don't
tony at tonybibbs.com  hunt or fish often see those of us who do as      
                    harmlessly strange and sort of amusing. When you  
                    think about it, that might be a fair assessment." 
                    --Unknown





More information about the geeklog-devel mailing list