Textpattern PHP Cross Reference Content Management Systems

Summary: /textpattern/include/txp_lang.php - 465 lines - 15152 bytes - Source - Print

Description: Languages panel.

Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 9 functions

list_languages()
save_language()
save_language_ui()
get_language()
install_lang_key()
get_textpack()
remove_language()
fetchLangName()
get_lang_files()

Functions

Functions that are not part of a class:

list_languages($message = '')  line: 54
Generates a grid of every language that Textpattern supports.

param: string|array $message The activity message
save_language()  line: 229
Saves the active language.

save_language_ui()  line: 279
Saves the active admin-side language.

get_language()  line: 313
Installs a language from a file.

The HTTP POST parameter 'lang_code' is the installed language,
e.g. 'en-gb', 'fi'.
install_lang_key(&$value, $key line: 340
Writes a new language string to the database.

The language is taken from a 'lang_code' HTTP POST or GET parameter.

The '$value' argument takes a string as an array. This array consists of keys
'name', 'event', 'data', 'uLastmod'.

param: array $value  The string
param: int   $key    Not used
get_textpack()  line: 385
Installs a Textpack.

The Textpack to load is fed by a 'textpack' HTTP POST parameter.
remove_language()  line: 400
Remove all language strings for the given lang code.

Removed language code is specified with 'lang_code' HTTP POST
parameter.
fetchLangName($lang_code line: 438
Get the lang name from the given language file.

return: string
param: string $lang_code Language designator
get_lang_files()  line: 455
Lists all language files in the 'lang' directory.

return: array Available language filenames

title

Body