diff options
author | Friendika <info@friendika.com> | 2011-05-23 20:30:37 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-05-23 20:30:37 -0700 |
commit | 040fc247a0caa51e0d4da4169980dc32e80ee804 (patch) | |
tree | edbf6122cc4b099222bf9ca6acf38f0aa7982aea /include | |
parent | 19ccd658ebcf13a7cc208a3e460e44d152dda32f (diff) | |
download | volse-hubzilla-040fc247a0caa51e0d4da4169980dc32e80ee804.tar.gz volse-hubzilla-040fc247a0caa51e0d4da4169980dc32e80ee804.tar.bz2 volse-hubzilla-040fc247a0caa51e0d4da4169980dc32e80ee804.zip |
bug #85
Diffstat (limited to 'include')
-rw-r--r-- | include/pgettext.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/pgettext.php b/include/pgettext.php index 37e09b54d..47242f7ba 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -53,6 +53,29 @@ function get_language() { }} +function push_lang($language) { + global $lang, $a; + + $a->langsave = $lang; + + if(isset($a->strings) && count($a->strings)) { + $a->stringsave = $a->strings; + } + $a->strings = array(); + load_translation_table($language); + $lang = $language; +} + +function pop_lang() { + global $lang, $a; + if(isset($a->stringsave)) + $a->strings = $a->stringsave; + else + $a->strings = array(); + + $lang = $a->langsave; +} + // load string translation table for alternate language |