diff options
author | Max Kostikov <max@kostikov.co> | 2021-03-03 20:05:37 +0000 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2021-03-03 20:05:37 +0000 |
commit | cf7f380568b195a01d909b2735d89e7ad8173ec0 (patch) | |
tree | cfef778de2d1464eb212d5e28e4720bd3ad9f49b /include/language.php | |
parent | 7e36727ce62318315698930d5209650d323a78a9 (diff) | |
parent | c2dc3e8dec7acf1f1750f7379e641ae8c7a2ed81 (diff) | |
download | volse-hubzilla-cf7f380568b195a01d909b2735d89e7ad8173ec0.tar.gz volse-hubzilla-cf7f380568b195a01d909b2735d89e7ad8173ec0.tar.bz2 volse-hubzilla-cf7f380568b195a01d909b2735d89e7ad8173ec0.zip |
Merge branch 'dev' into 'dev'
# Conflicts:
# boot.php
Diffstat (limited to 'include/language.php')
-rw-r--r-- | include/language.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/language.php b/include/language.php index 622b9614d..d291deb63 100644 --- a/include/language.php +++ b/include/language.php @@ -77,7 +77,7 @@ function get_best_language() { if(! isset($preferred)) { /* - * We could find no perfect match for any of the preferred languages. + * We could find no perfect match for any of the preferred languages. * For cases where the preference is fr-fr and we have fr but *not* fr-fr * run the test again and only look for the language base * which should provide an interface they can sort of understand @@ -262,11 +262,15 @@ function tt($singular, $plural, $count, $ctx = ''){ * @return string */ function ta($k){ + $t = null; - $t = App::$strings[$k]; - if (is_array($t)) - $t = implode("/", $t); - return ($t == "" ? $k : $t); + if(isset(App::$strings[$k])) + $t = App::$strings[$k]; + + if (is_array($t)) + $t = implode("/", $t); + + return ($t == "" ? $k : $t); } /** |