Multi-language support

BackThe language file is linked with the application file using xpath selectors.
When parsing the language file, documents processor will look in your output document, $GLOBALS["HTMLPARSER"], to find the elements in the xpath query given by the value of "target" attribute of each item in /lang/theLanguage/appName/*/node[@target]. If found, content of this one will be replaced by the content of the element in language file.

Structure of the file is:
//lang/SELECTED_LANGUAGE/APP_NAME/sys/ELEMENT_POINTING_TO_APP
//lang/SELECTED_LANGUAGE/APP_NAME/ui/ELEMENT_POINTING_TO_APP
//lang/SELECTED_LANGUAGE/APP_NAME/err/ELEMENT_POINTING_TO_APP

When writing your application just use your preferred language!!! Don't worry, looks difficult but it's really easy. We are having sys, ui and err elements just to help you structure better your language file. There's no difference on how these elements will be used. This way you can keep, for ex, navigation bar in sys, errors messages in err and document content in ui.
To select a new language you need to set $_SESSION["lang"] to the new value (ex: EN, FR, GE, RO, SP,...). You can use serverSettings.php, this will set the session variable and then redirect you back in to your page or where you indicate. Your link href attribute should be like http://YOUR_SERVER/serverSettings.php?lang=EN or http://YOUR_SERVER/serverSettings.php?lang=EN@redirect=YOUR_PAGE

Language file element pointing to element with id set to "tabs" in application:
Application with it's tabs element: