Set text domain to properly load messages file.

This commit is contained in:
Michal Čihař
2010-03-11 18:02:16 +01:00
parent 54c9f24fb8
commit 23eb18b51f

View File

@@ -344,9 +344,6 @@ function PMA_langList()
*/ */
$GLOBALS['lang_path'] = './locale/'; $GLOBALS['lang_path'] = './locale/';
define('LOCALE_DIR', realpath($GLOBALS['lang_path']));
define('DEFAULT_LOCALE', 'en_US');
/** /**
* Load gettext functions. * Load gettext functions.
*/ */
@@ -451,6 +448,10 @@ if (! PMA_langCheck()) {
// Set locale // Set locale
T_setlocale(LC_MESSAGES, $GLOBALS['lang']); T_setlocale(LC_MESSAGES, $GLOBALS['lang']);
T_bindtextdomain('phpmyadmin', $GLOBALS['lang_path']);
T_bind_textdomain_codeset('phpmyadmin', 'UTF-8');
T_textdomain('phpmyadmin');
// Load messages // Load messages
require_once './libraries/messages.inc.php'; require_once './libraries/messages.inc.php';