aboutsummaryrefslogtreecommitdiffstats
path: root/include/language.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-12 10:07:15 +0000
committerMario <mario@mariovavti.com>2021-03-12 10:07:15 +0000
commit3f053611bdbbd4a26a5d9c76a294b7ada07f0726 (patch)
treeb8b16b780d0353ede8580b41ec9e16f622c94c87 /include/language.php
parentc29261487cdecda4282df25769540bc4fa20631d (diff)
parent1582b8bc9620a661823c608c0c7023a70554214b (diff)
downloadvolse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.tar.gz
volse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.tar.bz2
volse-hubzilla-3f053611bdbbd4a26a5d9c76a294b7ada07f0726.zip
Merge branch 'dev' into air
Diffstat (limited to 'include/language.php')
-rw-r--r--include/language.php14
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);
}
/**