summaryrefslogtreecommitdiffstats
path: root/web/lib/translator.inc
diff options
context:
space:
mode:
authorAthurg Gooth <athurg@gooth.cn>2010-01-08 23:23:09 +0100
committerLoui Chang <louipc.ist@gmail.com>2010-01-08 23:23:09 +0100
commit8eab9ed4625a0ee657841fd9e894065acdf6e69c (patch)
tree219527b5272fa274e627d97ea67dd142033ec4fd /web/lib/translator.inc
parent55dcf5ce87f6e3e159ef35daac5eae86b624df3f (diff)
downloadaur-8eab9ed4625a0ee657841fd9e894065acdf6e69c.tar.gz
aur-8eab9ed4625a0ee657841fd9e894065acdf6e69c.tar.xz
Make DEFAULT_LANG mean the default language for displayed messages.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/lib/translator.inc')
-rw-r--r--web/lib/translator.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/web/lib/translator.inc b/web/lib/translator.inc
index 8c905515..6d963f50 100644
--- a/web/lib/translator.inc
+++ b/web/lib/translator.inc
@@ -49,16 +49,16 @@ function __() {
# First argument is always string to be translated
$tag = $args[0];
- if (empty($LANG) || $LANG == DEFAULT_LANG)
+ if (empty($LANG) || $LANG == DEFAULT_LANG){
$translated = $tag;
+ }
+
+ # If there is no translation, just print the given string.
+ if (empty($_t[$tag])) {
+ $translated = $tag;
+ }
else {
- # If there is no translation, just print the given string.
- if (empty($_t[$tag])) {
- $translated = $tag;
- }
- else {
- $translated = $_t[$tag];
- }
+ $translated = $_t[$tag];
}
$translated = htmlspecialchars($translated, ENT_QUOTES);