aboutsummaryrefslogtreecommitdiffstats
path: root/include/language.php
diff options
context:
space:
mode:
authorAlexandre Hannud Abdo <abdo@member.fsf.org>2014-05-21 04:48:22 -0300
committerAlexandre Hannud Abdo <abdo@member.fsf.org>2014-05-21 04:48:22 -0300
commit72a633dc51b98b25c740a9cb392acfaad77148d8 (patch)
tree6710d6143e255f9e24c96d1c7cd68d0811d9cab6 /include/language.php
parentc6de9096fabf913e5e8b4acbde75cd58bb8c9959 (diff)
downloadvolse-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.php5
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;