summaryrefslogtreecommitdiffstats
path: root/web/lib
diff options
context:
space:
mode:
authorLoui Chang <louipc.ist@gmail.com>2010-01-09 18:24:53 -0500
committerLoui Chang <louipc.ist@gmail.com>2010-01-09 18:24:53 -0500
commitc97f558898663442f8404e5a45c9f80a73ba0c78 (patch)
tree0291146dce0fe33c3bee100a321475d1c0ab8120 /web/lib
parent06e400a2f0b59e41f333458a5e3acf67b0fd3f1c (diff)
downloadaurweb-c97f558898663442f8404e5a45c9f80a73ba0c78.tar.xz
Remove useless or redundant code for translations.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/aur.inc9
-rw-r--r--web/lib/translator.inc4
2 files changed, 3 insertions, 10 deletions
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index 821288d..e0521ab 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -275,9 +275,8 @@ function set_lang() {
$q.= "AND Sessions.SessionID = '";
$q.= mysql_real_escape_string($_COOKIE["AURSID"])."'";
$result = db_query($q, $dbh);
- if (!$result) {
- $LANG = "en";
- } else {
+
+ if ($result) {
$row = mysql_fetch_array($result);
$LANG = $row[0];
}
@@ -293,10 +292,8 @@ function set_lang() {
setcookie("AURLANG", $LANG, 0, "/");
}
- if ($LANG != DEFAULT_LANG ) {
+ if ($LANG != "en" ) {
include_once("$LANG.po");
- } else {
- include_once(DEFAULT_LANG.".po");
}
return;
diff --git a/web/lib/translator.inc b/web/lib/translator.inc
index 650f796..6bb9358 100644
--- a/web/lib/translator.inc
+++ b/web/lib/translator.inc
@@ -35,10 +35,6 @@ function __() {
# First argument is always string to be translated
$tag = $args[0];
- if (empty($LANG) || $LANG == DEFAULT_LANG){
- $translated = $tag;
- }
-
# If there is no translation, just print the given string.
if (empty($_t[$tag])) {
$translated = $tag;