Language translation functions.
The idea is very much stolen from the GNU translate C library.
We load a translation file and store it in the global array $translations. If a cache dir is enabled (in $settings[]), then we serialize $translations and store it as a file in the cache dir. The next call will unserialize the cached file rather than re-parse the file.
Although there is a PHP gettext () function, I prefer to use this home-grown translate function since it is simpler to work with.
Generate translated array of language names
The first is the name presented to users while the second is the filename (without the ".txt") that must exist in the translations subdirectory. Only called from admin.php and pref.php.
Translates and removes HTML from text, and prints it.
This is useful for tooltips, which barf on HTML.
Note: () returns the result rather than print the value.
Translates text and prints it.
This is just an abbreviation for:
Converts language names to their abbreviation.
Loads all the language translation into an array for quick lookup.
Note: There is no need to call this manually. It will be invoked by () the first time it is called.
Read in a language file and cache it if we can.
Unloads $translations so we can translate a different language.
Translates and removes HTML from text, and returns it.
This is useful for tooltips, which barf on HTML.
Note: () prints the result rather than return the value.
Translates a string from the default English usage to another language.
The first time that this is called, the translation file will be loaded (with ()).
Performs html_entity_decode style conversion for php < 4.3 Borrowed from http://us2.php.net/manual/en/function.html-entity-decode.php
Documentation generated on Thu, 10 Jun 2010 17:08:37 -0400 by phpDocumentor 1.4.3