The branch, master has been updated via f9ccd69538a1d934db6a8ca8dd120811b2a7958d (commit) from a86d3fee48b27eb07dd363bb60d0799d068b5d40 (commit)
- Log ----------------------------------------------------------------- commit f9ccd69538a1d934db6a8ca8dd120811b2a7958d Author: Michal Čihař mcihar@novell.com Date: Fri Apr 9 13:54:15 2010 +0200
Remove no longer needed language file names.
-----------------------------------------------------------------------
Summary of changes: browse_foreigners.php | 4 +- config.sample.inc.php | 2 +- index.php | 2 +- libraries/config.default.php | 4 +- libraries/core.lib.php | 6 +- libraries/display_select_lang.lib.php | 4 +- libraries/header_meta_style.inc.php | 4 +- libraries/header_printview.inc.php | 2 +- libraries/select_lang.lib.php | 134 ++++++++++++++++----------------- libraries/url_generating.lib.php | 6 +- navigation.php | 6 +- pmd_general.php | 2 +- setup/frames/index.inc.php | 8 +- test/theme.php | 2 +- 14 files changed, 92 insertions(+), 94 deletions(-)
diff --git a/browse_foreigners.php b/browse_foreigners.php index b1f2083..69b210e 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -87,8 +87,8 @@ if (is_array($foreignData['disp_row'])) { <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" - xml:lang="<?php echo $available_languages[$lang][2]; ?>" - lang="<?php echo $available_languages[$lang][2]; ?>" + xml:lang="<?php echo $available_languages[$lang][1]; ?>" + lang="<?php echo $available_languages[$lang][1]; ?>" dir="<?php echo $text_dir; ?>">
<head> diff --git a/config.sample.inc.php b/config.sample.inc.php index e044304..e952c80 100644 --- a/config.sample.inc.php +++ b/config.sample.inc.php @@ -110,7 +110,7 @@ $cfg['SaveDir'] = ''; * Default language to use, if not browser-defined or user-defined * (you find all languages in the file libraries/select_lang.lib.php) * uncomment the desired line: - * default = 'en-utf-8' + * default = 'en' */ //$cfg['DefaultLang'] = 'en'; //$cfg['DefaultLang'] = 'de'; diff --git a/index.php b/index.php index a57be9b..98f4c9f 100644 --- a/index.php +++ b/index.php @@ -92,7 +92,7 @@ if (isset($GLOBALS['target']) && is_string($GLOBALS['target']) && !empty($GLOBAL
$main_target .= $url_query;
-$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2]; +$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
// start output diff --git a/libraries/config.default.php b/libraries/config.default.php index 2d1ca1c..d1426d5 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -1949,7 +1949,7 @@ $cfg['PDFDefaultPageSize'] = 'A4'; * * @global string $cfg['DefaultLang'] */ -$cfg['DefaultLang'] = 'en-utf-8'; +$cfg['DefaultLang'] = 'en';
/** * Default connection collation @@ -1961,7 +1961,7 @@ $cfg['DefaultConnectionCollation'] = 'utf8_general_ci'; /** * Force: always use this language - must be defined in * libraries/select_lang.lib.php - * $cfg['Lang'] = 'en-utf-8'; + * $cfg['Lang'] = 'en'; * * Regular expression to limit listed languages, e.g. '^(cs|en)' for Czech and * English only diff --git a/libraries/core.lib.php b/libraries/core.lib.php index 69a6aaf..3b8f377 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -225,7 +225,7 @@ function PMA_fatalError($error_message, $message_args = null) // it could happen PMA_fatalError() is called before language file is loaded if (! isset($GLOBALS['available_languages'])) { $GLOBALS['cfg'] = array( - 'DefaultLang' => 'en-utf-8', + 'DefaultLang' => 'en', 'AllowAnywhereRecoding' => false);
// Loads the language file @@ -237,7 +237,7 @@ function PMA_fatalError($error_message, $message_args = null) $GLOBALS['strError'] = 'Error'; }
- // $text_dir is set in lang/language-utf-8.inc.php + // $text_dir is set in po file if (isset($text_dir)) { $GLOBALS['text_dir'] = $text_dir; } @@ -262,7 +262,7 @@ function PMA_fatalError($error_message, $message_args = null) // Displays the error message // (do not use & for parameters sent by header) $query_params = array( - 'lang' => $GLOBALS['available_languages'][$GLOBALS['lang']][2], + 'lang' => $GLOBALS['available_languages'][$GLOBALS['lang']][1], 'dir' => $GLOBALS['text_dir'], 'type' => $GLOBALS['strError'], 'error' => $error_message, diff --git a/libraries/display_select_lang.lib.php b/libraries/display_select_lang.lib.php index 831f8c5..f91ea0a 100644 --- a/libraries/display_select_lang.lib.php +++ b/libraries/display_select_lang.lib.php @@ -65,8 +65,8 @@ function PMA_select_language($use_fieldset = FALSE, $show_doc = TRUE) { $lang_name = ucfirst(substr(strrchr($tmplang[0], '|'), 1));
// Include native name if non empty - if (!empty($tmplang[3])) { - $lang_name = $tmplang[3] . ' - ' + if (!empty($tmplang[2])) { + $lang_name = $tmplang[2] . ' - ' . $lang_name; }
diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php index c6c6f96..a0cd326 100644 --- a/libraries/header_meta_style.inc.php +++ b/libraries/header_meta_style.inc.php @@ -34,7 +34,7 @@ if ($GLOBALS['text_dir'] == 'ltr') { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $GLOBALS['charset']; ?>" /> <link rel="icon" href="./favicon.ico" type="image/x-icon" /> @@ -46,7 +46,7 @@ if ($GLOBALS['text_dir'] == 'ltr') { echo 'phpMyAdmin'; } ?></title> -<?php +<?php // goes before our themed CSS if (defined('PMA_COLORPICKER')) { ?> <link rel="stylesheet" type="text/css" href="js/colorpicker/css/colorpicker.css" /> diff --git a/libraries/header_printview.inc.php b/libraries/header_printview.inc.php index 962c590..7001019 100644 --- a/libraries/header_printview.inc.php +++ b/libraries/header_printview.inc.php @@ -41,7 +41,7 @@ if ($text_dir == 'ltr') { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][2]; ?>" lang="<?php echo $available_languages[$lang][2]; ?>" dir="<?php echo $text_dir; ?>"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $available_languages[$lang][1]; ?>" lang="<?php echo $available_languages[$lang][1]; ?>" dir="<?php echo $text_dir; ?>">
<head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" /> diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php index f98d1c3..0f1ba8a 100644 --- a/libraries/select_lang.lib.php +++ b/libraries/select_lang.lib.php @@ -172,11 +172,9 @@ function PMA_langDetect($str, $envType) * be specified first; * - the '|' character (it means 'OR'); * - the full language name. - * 3. The second value associated to the key is the name of the file to load - * without the 'inc.php' extension. - * 4. The third value associated to the key is the language code as defined by + * 3. The second value associated to the key is the language code as defined by * the RFC1766. - * 5. The fourth value is its native name in html entities. + * 4. The third value is its native name in html entities or UTF-8. * * Beware that the sorting order (first values associated to keys by * alphabetical reverse order in the array) is important: 'zh-tw' (chinese @@ -187,129 +185,129 @@ function PMA_langDetect($str, $envType) function PMA_langDetails($lang) { switch ($lang) { case 'en': - return array('en|english', 'english-utf-8', 'en', ''); + return array('en|english', 'en', ''); case 'af': - return array('af|afrikaans', 'afrikaans-utf-8', 'af', ''); + return array('af|afrikaans', 'af', ''); case 'ar': - return array('ar|arabic', 'arabic-utf-8', 'ar', 'العربية'); + return array('ar|arabic', 'ar', 'العربية'); case 'az': - return array('az|azerbaijani', 'azerbaijani-utf-8', 'az', 'Azərbaycanca'); + return array('az|azerbaijani', 'az', 'Azərbaycanca'); case 'bn': - return array('bn|bangla', 'bangla-utf-8', 'bn', ''); + return array('bn|bangla', 'bn', ''); case 'be': - return array('be|belarusian', 'belarusian_cyrillic-utf-8', 'be', 'Беларуская'); + return array('be|belarusian', 'be', 'Беларуская'); case 'be@latin': - return array('be[-_]lat|belarusian latin', 'belarusian_latin-utf-8', 'be-lat', 'Biełaruskaja'); + return array('be[-_]lat|belarusian latin', 'be-lat', 'Biełaruskaja'); case 'bg': - return array('bg|bulgarian', 'bulgarian-utf-8', 'bg', 'Български'); + return array('bg|bulgarian', 'bg', 'Български'); case 'bs': - return array('bs|bosnian', 'bosnian-utf-8', 'bs', 'Bosanski'); + return array('bs|bosnian', 'bs', 'Bosanski'); case 'ca': - return array('ca|catalan', 'catalan-utf-8', 'ca', 'Català'); + return array('ca|catalan', 'ca', 'Català'); case 'cs': - return array('cs|czech', 'czech-utf-8', 'cs', 'Česky'); + return array('cs|czech', 'cs', 'Česky'); case 'da': - return array('da|danish', 'danish-utf-8', 'da', 'Dansk'); + return array('da|danish', 'da', 'Dansk'); case 'de': - return array('de|german', 'german-utf-8', 'de', 'Deutsch'); + return array('de|german', 'de', 'Deutsch'); case 'el': - return array('el|greek', 'greek-utf-8', 'el', 'Ελληνικά'); + return array('el|greek', 'el', 'Ελληνικά'); case 'en': - return array('en|english', 'english-utf-8', 'en', ''); + return array('en|english', 'en', ''); case 'en_GB': - return array('en[_-]gb|english (United Kingdom)', 'english-gb-utf-8', 'en', ''); + return array('en[_-]gb|english (United Kingdom)', 'en-gb', ''); case 'es': - return array('es|spanish', 'spanish-utf-8', 'es', 'Español'); + return array('es|spanish', 'es', 'Español'); case 'et': - return array('et|estonian', 'estonian-utf-8', 'et', 'Eesti'); + return array('et|estonian', 'et', 'Eesti'); case 'eu': - return array('eu|basque', 'basque-utf-8', 'eu', 'Euskara'); + return array('eu|basque', 'eu', 'Euskara'); case 'fa': - return array('fa|persian', 'persian-utf-8', 'fa', 'فارسی'); + return array('fa|persian', 'fa', 'فارسی'); case 'fi': - return array('fi|finnish', 'finnish-utf-8', 'fi', 'Suomi'); + return array('fi|finnish', 'fi', 'Suomi'); case 'fr': - return array('fr|french', 'french-utf-8', 'fr', 'Français'); + return array('fr|french', 'fr', 'Français'); case 'gl': - return array('gl|galician', 'galician-utf-8', 'gl', 'Galego'); + return array('gl|galician', 'gl', 'Galego'); case 'he': - return array('he|hebrew', 'hebrew-utf-8', 'he', 'עברית'); + return array('he|hebrew', 'he', 'עברית'); case 'hi': - return array('hi|hindi', 'hindi-utf-8', 'hi', 'हिन्दी'); + return array('hi|hindi', 'hi', 'हिन्दी'); case 'hr': - return array('hr|croatian', 'croatian-utf-8', 'hr', 'Hrvatski'); + return array('hr|croatian', 'hr', 'Hrvatski'); case 'hu': - return array('hu|hungarian', 'hungarian-utf-8', 'hu', 'Magyar'); + return array('hu|hungarian', 'hu', 'Magyar'); case 'id': - return array('id|indonesian', 'indonesian-utf-8', 'id', 'Bahasa Indonesia'); + return array('id|indonesian', 'id', 'Bahasa Indonesia'); case 'it': - return array('it|italian', 'italian-utf-8', 'it', 'Italiano'); + return array('it|italian', 'it', 'Italiano'); case 'ja': - return array('ja|japanese', 'japanese-utf-8', 'ja', '日本語'); + return array('ja|japanese', 'ja', '日本語'); case 'ko': - return array('ko|korean', 'korean-utf-8', 'ko', '한국어'); + return array('ko|korean', 'ko', '한국어'); case 'ka': - return array('ka|georgian', 'georgian-utf-8', 'ka', 'ქართული'); + return array('ka|georgian', 'ka', 'ქართული'); case 'lt': - return array('lt|lithuanian', 'lithuanian-utf-8', 'lt', 'Lietuvių'); + return array('lt|lithuanian', 'lt', 'Lietuvių'); case 'lv': - return array('lv|latvian', 'latvian-utf-8', 'lv', 'Latviešu'); + return array('lv|latvian', 'lv', 'Latviešu'); case 'mk': - return array('mk|macedonian', 'macedonian_cyrillic-utf-8', 'mk', 'Macedonian'); + return array('mk|macedonian', 'mk', 'Macedonian'); case 'mn': - return array('mn|mongolian', 'mongolian-utf-8', 'mn', 'Монгол'); + return array('mn|mongolian', 'mn', 'Монгол'); case 'ms': - return array('ms|malay', 'malay-utf-8', 'ms', 'Bahasa Melayu'); + return array('ms|malay', 'ms', 'Bahasa Melayu'); case 'nl': - return array('nl|dutch', 'dutch-utf-8', 'nl', 'Nederlands'); + return array('nl|dutch', 'nl', 'Nederlands'); case 'nb': - return array('nb|norwegian', 'norwegian-utf-8', 'nb', 'Norsk'); + return array('nb|norwegian', 'nb', 'Norsk'); case 'pl': - return array('pl|polish', 'polish-utf-8', 'pl', 'Polski'); + return array('pl|polish', 'pl', 'Polski'); case 'pt_BR': - return array('pt[-_]br|brazilian portuguese', 'brazilian_portuguese-utf-8', 'pt-BR', 'Português'); + return array('pt[-_]br|brazilian portuguese', 'pt-BR', 'Português'); case 'pt': - return array('pt|portuguese', 'portuguese-utf-8', 'pt', 'Português'); + return array('pt|portuguese', 'pt', 'Português'); case 'ro': - return array('ro|romanian', 'romanian-utf-8', 'ro', 'Română'); + return array('ro|romanian', 'ro', 'Română'); case 'ru': - return array('ru|russian', 'russian-utf-8', 'ru', 'Русский'); + return array('ru|russian', 'ru', 'Русский'); case 'si': - return array('si|sinhala', 'sinhala-utf-8', 'si', 'සිංහල'); + return array('si|sinhala', 'si', 'සිංහල'); case 'sk': - return array('sk|slovak', 'slovak-utf-8', 'sk', 'Slovenčina'); + return array('sk|slovak', 'sk', 'Slovenčina'); case 'sl': - return array('sl|slovenian', 'slovenian-utf-8', 'sl', 'Slovenščina'); + return array('sl|slovenian', 'sl', 'Slovenščina'); case 'sq': - return array('sq|albanian', 'albanian-utf-8', 'sq', 'Shqip'); + return array('sq|albanian', 'sq', 'Shqip'); case 'sr@latin': - return array('sr[-_]lat|serbian latin', 'serbian_latin-utf-8', 'sr-lat', 'Srpski'); + return array('sr[-_]lat|serbian latin', 'sr-lat', 'Srpski'); case 'sr': - return array('sr|serbian', 'serbian_cyrillic-utf-8', 'sr', 'Српски'); + return array('sr|serbian', 'sr', 'Српски'); case 'sv': - return array('sv|swedish', 'swedish-utf-8', 'sv', 'Svenska'); + return array('sv|swedish', 'sv', 'Svenska'); case 'ta': - return array('ta|tamil', 'tamil-utf-8', 'ta', 'தமிழ்'); + return array('ta|tamil', 'ta', 'தமிழ்'); case 'te': - return array('te|telugu', 'telugu-utf-8', 'te', 'తెలుగు'); + return array('te|telugu', 'te', 'తెలుగు'); case 'th': - return array('th|thai', 'thai-utf-8', 'th', 'ภาษาไทย'); + return array('th|thai', 'th', 'ภาษาไทย'); case 'tr': - return array('tr|turkish', 'turkish-utf-8', 'tr', 'Türkçe'); + return array('tr|turkish', 'tr', 'Türkçe'); case 'tt': - return array('tt|tatarish', 'tatarish-utf-8', 'tt', 'Tatarça'); + return array('tt|tatarish', 'tt', 'Tatarça'); case 'uk': - return array('uk|ukrainian', 'ukrainian-utf-8', 'uk', 'Українська'); + return array('uk|ukrainian', 'uk', 'Українська'); case 'ur': - return array('ur|urdu', 'urdu-utf-8', 'ur', 'اُردوُ'); + return array('ur|urdu', 'ur', 'اُردوُ'); case 'uz@latin': - return array('uz[-_]lat|uzbek-latin', 'uzbek_latin-utf-8', 'uz-lat', 'O‘zbekcha'); + return array('uz[-_]lat|uzbek-latin', 'uz-lat', 'O‘zbekcha'); case 'uz': - return array('uz[-_]cyr|uzbek-cyrillic', 'uzbek_cyrillic-utf-8', 'uz-cyr', 'Ўзбекча'); + return array('uz[-_]cyr|uzbek-cyrillic', 'uz-cyr', 'Ўзбекча'); case 'zh_TW': - return array('zh[-_](tw|hk)|chinese traditional', 'chinese_traditional-utf-8', 'zh-TW', '中文'); + return array('zh[-_](tw|hk)|chinese traditional', 'zh-TW', '中文'); case 'zh_CN': - return array('zh|chinese simplified', 'chinese_simplified-utf-8', 'zh', '中文'); + return array('zh|chinese simplified', 'zh', '中文'); } return array("$lang|$lang", $lang, $lang); } @@ -322,7 +320,7 @@ function PMA_langDetails($lang) { function PMA_langList() { /* We can always speak English */ - $result = array('en-utf-8' => PMA_langDetails('en')); + $result = array('en' => PMA_langDetails('en'));
/* Open the directory */ $handle = @opendir($GLOBALS['lang_path']); @@ -440,7 +438,7 @@ if (empty($GLOBALS['convcharset'])) {
if (! PMA_langCheck()) { // fallback language - $fall_back_lang = 'en-utf-8'; + $fall_back_lang = 'en'; $line = __LINE__; if (! PMA_langSet($fall_back_lang)) { trigger_error('phpMyAdmin-ERROR: invalid lang code: ' diff --git a/libraries/url_generating.lib.php b/libraries/url_generating.lib.php index a0c8c60..fddeb7e 100644 --- a/libraries/url_generating.lib.php +++ b/libraries/url_generating.lib.php @@ -145,7 +145,7 @@ function PMA_getHiddenFields($values, $pre = '') * // produces with cookies enabled: * // script.php?db=mysql&table=rights * // with cookies disabled: - * // script.php?server=1&lang=en-utf-8&db=mysql&table=rights + * // script.php?server=1&lang=en&db=mysql&table=rights * * // NEW style * $params['myparam'] = 'myvalue'; @@ -156,14 +156,14 @@ function PMA_getHiddenFields($values, $pre = '') * // produces with cookies enabled: * // script.php?myparam=myvalue&db=mysql&table=rights * // with cookies disabled: - * // script.php?server=1&lang=en-utf-8&myparam=myvalue&db=mysql&table=rights + * // script.php?server=1&lang=en&myparam=myvalue&db=mysql&table=rights * * // note the missing ? * echo 'script.php' . PMA_generate_common_url(); * // produces with cookies enabled: * // script.php * // with cookies disabled: - * // script.php?server=1&lang=en-utf-8 + * // script.php?server=1&lang=en * </code> * * @uses $GLOBALS['server'] diff --git a/navigation.php b/navigation.php index 3699f76..b3e3107 100644 --- a/navigation.php +++ b/navigation.php @@ -136,8 +136,8 @@ require_once './libraries/header_http.inc.php'; <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" - xml:lang="<?php echo $available_languages[$lang][2]; ?>" - lang="<?php echo $available_languages[$lang][2]; ?>" + xml:lang="<?php echo $available_languages[$lang][1]; ?>" + lang="<?php echo $available_languages[$lang][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>">
<head> @@ -577,7 +577,7 @@ function PMA_displayTableList($tables, $visible = false, echo '<ul id="subel' . $element_counter . '" style="display: none">'; } foreach ($tables as $group => $table) { - // only allow grouping if the group has more than 1 table + // only allow grouping if the group has more than 1 table if (isset($table['is' . $sep . 'group']) && $table['tab' . $sep . 'count'] > 1) { $common_url_query = $GLOBALS['common_url_query'] . '&tbl_group=' . urlencode($tab_group_full . $group); diff --git a/pmd_general.php b/pmd_general.php index 0f5a668..01a0a2d 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -21,7 +21,7 @@ $hidden = "hidden"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][2]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" lang="<?php echo $GLOBALS['available_languages'][$GLOBALS['lang']][1]; ?>" dir="<?php echo $GLOBALS['text_dir']; ?>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset ?>" /> <link rel="icon" href="pmd/images/favicon.ico" type="image/x-icon" /> diff --git a/setup/frames/index.inc.php b/setup/frames/index.inc.php index 6282382..2da815b 100644 --- a/setup/frames/index.inc.php +++ b/setup/frames/index.inc.php @@ -77,8 +77,8 @@ if (!$is_https) {
$lang_name = ucfirst(substr(strrchr($each_lang[0], '|'), 1)); // Include native name if non empty - if (!empty($each_lang[3])) { - $lang_name = $each_lang[3] . ' - ' . $lang_name; + if (!empty($each_lang[2])) { + $lang_name = $each_lang[2] . ' - ' . $lang_name; }
//Is current one active? @@ -174,8 +174,8 @@ $opts = array( foreach ($all_languages as $each_lang_key => $each_lang) { $lang_name = ucfirst(substr(strrchr($each_lang[0], '|'), 1)); // Include native name if non empty - if (!empty($each_lang[3])) { - $lang_name = $each_lang[3] . ' - ' . $lang_name; + if (!empty($each_lang[2])) { + $lang_name = $each_lang[2] . ' - ' . $lang_name; } $opts['values'][$each_lang_key] = $lang_name; } diff --git a/test/theme.php b/test/theme.php index 84819ea..06fb45c 100644 --- a/test/theme.php +++ b/test/theme.php @@ -15,7 +15,7 @@ chdir('..'); */ require_once './libraries/common.inc.php';
-$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2]; +$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
// start output header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
hooks/post-receive