[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/media/includes
From: Albert Astals Cid <tsdgeos () terra ! es>
Date: 2011-08-03 20:35:52
Message-ID: 20110803203552.B453BAC86E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1244709 by aacid:
allow translation to "en" for those webs whose default locale is not "en" (e.g. \
kdeespana)
M +6 -4 functions.inc
--- trunk/www/media/includes/functions.inc #1244708:1244709
@@ -166,11 +166,11 @@
function startTranslation($dictionary)
{
global $document_root;
+ global $default_site_locale;
if (!isset($_SERVER['REQUEST_URI']))
return;
-
- if ($dictionary != "en" && basename($dictionary) === $dictionary)
+ if ((($dictionary != "en") || (isset($default_site_locale) && $default_site_locale \
!= "en")) && basename($dictionary) === $dictionary) {
global $text; //needed!
@@ -210,12 +210,13 @@
if (func_num_args() < 1) return "";
global $text;
+ global $default_site_locale;
global $site_locale;
global $enable_xtest;
$translate = func_get_arg(0);
- if ($site_locale == "en")
+ if ($site_locale == "en" && (!isset($default_site_locale) || $default_site_locale \
== "en")) {
$result = $translate;
}
@@ -248,9 +249,10 @@
function i18n($translate)
{
global $text;
+ global $default_site_locale;
global $site_locale;
global $enable_xtest;
- if ($site_locale == "en")
+ if ($site_locale == "en" && (!isset($default_site_locale) || $default_site_locale \
== "en")) {
print $translate;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic