diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 585c9ce87f..17fbcf8a45 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-01-10 Junichi Satoh + + * mobile/index.php: Fixed i18n translation does not work with mobile + console. + 2012-01-09 Vanessa Gil * godmode/agentes/planned_downtime.php: allow cancelling scheduled downtime once it has started. diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index a2134b421d..f67982469d 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -12,6 +12,11 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. +//Set character encoding to UTF-8 - fixes a lot of multibyte character headaches +if (function_exists ('mb_internal_encoding')) { + mb_internal_encoding ("UTF-8"); +} + ob_start (); require_once("include/system.class.php"); @@ -33,6 +38,15 @@ if ($user == null) { $user = new User(); } $user->hackinjectConfig(); + +if ($user->isLogged()) { + $user_language = get_user_language ($system->getConfig('id_user')); + if (file_exists ('../include/languages/'.$user_language.'.mo')) { + $l10n = new gettext_reader (new CachedFileReader ('../include/languages/'.$user_language.'.mo')); + $l10n->load_tables(); + } +} + ?> @@ -64,7 +78,11 @@ $user->hackinjectConfig(); require ("../general/noaccess.php"); return; } - + $user_language = get_user_language ($system->getConfig('id_user')); + if (file_exists ('../include/languages/'.$user_language.'.mo')) { + $l10n = new gettext_reader (new CachedFileReader ('../include/languages/'.$user_language.'.mo')); + $l10n->load_tables(); + } $tactical = new Tactical(); $tactical->show(); }