translation driver, language file update script and example usage

Review Request #86 - Created May 22, 2009 and updated - Latest diff uploaded

Information
Alexandru Tandrau
infoarena
infoarena.org
Reviewers
hackers
translation driver:
by calling the translate() function anywhere, the string will be shown in current language (en for infoarena.org, ro for infoarena.ro)
lang/driver.php

update script:
this script firstly goes through all php files and creates a list of strings to be translated
if a translation for a string already exists in the language file, the current translation is kept. if no translation is found, then a new translation is made using google translate and added to the language file

example:
www/views/header.php
www/views/form_login.php

if en.php is removed and one runs update.php (php update.php), en.php is recreated and the left sidebar of infoarena is now translated in english. the initial translation can sometimes not be context-related (e.g. monitor de evaluare) so, after this step, further review and changes should be done in the language file.  
* translated the sidebar - also included tests with ",' and some other special characters
Loading...