diff options
Diffstat (limited to 'web/lib/translator.inc')
-rw-r--r-- | web/lib/translator.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/web/lib/translator.inc b/web/lib/translator.inc index 41ece89b..f16bd11f 100644 --- a/web/lib/translator.inc +++ b/web/lib/translator.inc @@ -37,12 +37,16 @@ function __() { # First argument is always string to be translated $tag = $args[0]; - $translated = $_t[$LANG][$tag]; + if (empty($LANG) || $LANG == DEFAULT_LANG) + $translated = $tag; + else + $translated = $_t[$LANG][$tag]; + if (empty($translated)) { # if it's a supported language, but there isn't a translation, # alert the visitor to the missing translation. # - $translated = "<b style=\"color: red\">_${tag}_</b>"; + $translated = "_${tag}_"; } # This condition is to reorganise the arguments in case of @@ -63,4 +67,3 @@ function __() { return $translated; } -?> |