diff options
author | Alexandre Hannud Abdo <abdo@member.fsf.org> | 2014-05-21 04:48:22 -0300 |
---|---|---|
committer | Alexandre Hannud Abdo <abdo@member.fsf.org> | 2014-05-21 04:48:22 -0300 |
commit | 72a633dc51b98b25c740a9cb392acfaad77148d8 (patch) | |
tree | 6710d6143e255f9e24c96d1c7cd68d0811d9cab6 /include/language.php | |
parent | c6de9096fabf913e5e8b4acbde75cd58bb8c9959 (diff) | |
download | volse-hubzilla-72a633dc51b98b25c740a9cb392acfaad77148d8.tar.gz volse-hubzilla-72a633dc51b98b25c740a9cb392acfaad77148d8.tar.bz2 volse-hubzilla-72a633dc51b98b25c740a9cb392acfaad77148d8.zip |
Make translation contexts effective.
Diffstat (limited to 'include/language.php')
-rw-r--r-- | include/language.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/language.php b/include/language.php index f4c7d1524..ba14c33be 100644 --- a/include/language.php +++ b/include/language.php @@ -153,8 +153,9 @@ function load_translation_table($lang, $install = false) { function t($s,$ctx = '') { global $a; - if(x($a->strings,$s)) { - $t = $a->strings[$s]; + $cs = $ctx?"__ctx:".$ctx."__ ".$s:$s; + if(x($a->strings,$cs)) { + $t = $a->strings[$cs]; return is_array($t) ? $t[0] : $t; } return $s; |