Remove useless or redundant code for translations.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
Loui Chang 2010-01-09 18:24:53 -05:00
parent 06e400a2f0
commit c97f558898
2 changed files with 3 additions and 10 deletions

View file

@ -275,9 +275,8 @@ function set_lang() {
$q.= "AND Sessions.SessionID = '"; $q.= "AND Sessions.SessionID = '";
$q.= mysql_real_escape_string($_COOKIE["AURSID"])."'"; $q.= mysql_real_escape_string($_COOKIE["AURSID"])."'";
$result = db_query($q, $dbh); $result = db_query($q, $dbh);
if (!$result) {
$LANG = "en"; if ($result) {
} else {
$row = mysql_fetch_array($result); $row = mysql_fetch_array($result);
$LANG = $row[0]; $LANG = $row[0];
} }
@ -293,10 +292,8 @@ function set_lang() {
setcookie("AURLANG", $LANG, 0, "/"); setcookie("AURLANG", $LANG, 0, "/");
} }
if ($LANG != DEFAULT_LANG ) { if ($LANG != "en" ) {
include_once("$LANG.po"); include_once("$LANG.po");
} else {
include_once(DEFAULT_LANG.".po");
} }
return; return;

View file

@ -35,10 +35,6 @@ function __() {
# First argument is always string to be translated # First argument is always string to be translated
$tag = $args[0]; $tag = $args[0];
if (empty($LANG) || $LANG == DEFAULT_LANG){
$translated = $tag;
}
# If there is no translation, just print the given string. # If there is no translation, just print the given string.
if (empty($_t[$tag])) { if (empty($_t[$tag])) {
$translated = $tag; $translated = $tag;