diff options
Diffstat (limited to 'include/pgettext.php')
-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 |