diff options
Diffstat (limited to 'include/pgettext.php')
-rw-r--r-- | include/pgettext.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/pgettext.php b/include/pgettext.php index 49f100737..c7fc58698 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -90,8 +90,11 @@ if(! function_exists('load_translation_table')) { function load_translation_table($lang) { global $a; - if(file_exists("view/$lang/strings.php")) + if(file_exists("view/$lang/strings.php")) { include("view/$lang/strings.php"); + } + else + $a->strings = array(); }} // translate string if translation exists @@ -110,12 +113,13 @@ function t($s) { if(! function_exists('tt')){ function tt($singular, $plural, $count){ - + global $lang; $a = get_app(); if(x($a->strings,$singular)) { $t = $a->strings[$singular]; - $k = string_plural_select($count); + $f = 'string_plural_select_' . str_replace('-','_',$lang); + $k = $f($count); return is_array($t)?$t[$k]:$t; } |