OpenEMR Internationalization Development Guide

From OpenEMR Project Wiki
Revision as of 23:58, 6 November 2011 by Bradymiller (talk | contribs) (Created page with ":For those interested in the actual software/scripts (pipeline) that created the language spreadsheet and then utilizes it for insertion in OpenEMR; they are kept in this directo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
For those interested in the actual software/scripts (pipeline) that created the language spreadsheet and then utilizes it for insertion in OpenEMR; they are kept in this directory (The README file is the best place to get an overview of the process):
For those of you interested in the xl() internationalization function, then go HERE.
Here are the Previous sourceforge forums threads related to the internationalization project:
General Topic Threads
Specific Topic Threads
The translation is done by the xl() custom function, which can be found at openemr/library/translation.inc.php. Its semantics are very simple.
xl(string)
Which with examples means:
xl('translate this')
By default the function will return the translation. First it uses the LANGUAGE constant defined to pick the translation. Second it goes for the translation, if none is found, then the same string entered is used and returned as is. Another example of use includes:
echo ("this and " . xl('translate this') . " that too");
Further details and rules on use can be found on the wiki here Development Policies - Internationalization
There are also wrappers to the xl() function that are used infrequently in specific situations. Please refer to openemr/library/translation.inc.php for more details.