*/\r
function show_select_locale_form()\r
{\r
- // Get the browser language that can be displayed\r
- // TODO: default locale select simple implementation\r
- $languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\r
- foreach ( $languages as $language )\r
- {\r
- $language = preg_replace('#([\w]+).*#', '$1', $language);\r
- break;\r
- }\r
-\r
// get locale list\r
- $native_locales = array(\r
- 'bg_Cyrl_BG' => 'български - България',\r
- 'ca_Latn_ES' => 'català - català',\r
- 'cs_Latn_CZ' => 'čeština - Česká republika',\r
- 'de_Latn_DE' => 'Deutsch - Deutschland',\r
- 'en_Latn_US' => 'English - United States',\r
- 'es_Latn_ES' => 'Español - España, alfabetización internacional',\r
- 'fa_Arab_IR' => 'فارسى - ایران',\r
- 'fi_Latn_FI' => 'suomi - Suomi',\r
- 'fr_Latn_FR' => 'français - France',\r
- 'gl_Latn_ES' => 'galego - galego',\r
- 'hu_Latn_HU' => 'magyar - Magyarország',\r
- 'it_Latn_IT' => 'italiano - Italia',\r
- 'ja_Jpan_JP' => '日本語 - 日本',\r
- 'ko_Kore_KR' => '한국어 - 대한민국',\r
- 'lv_Latn_LV' => 'latviešu - Latvija',\r
- 'nl_Latn_NL' => 'Nederlands - Nederland',\r
- 'pt_Latn_BR' => 'Português - Brasil',\r
- 'ru_Cyrl_RU' => 'русский - Россия',\r
- 'sk_Latn_SK' => 'slovenčina - Slovenská republika',\r
- 'zh_Hans_CN' => '中文 - 中华人民共和国',\r
- 'zh_Hant_TW' => '中文 - 台灣'\r
- );\r
- \r
$localelist = i18n::get_available_locale_list();\r
$locales = array();\r
foreach ( $localelist as $locale ) {\r
$checkfile = './locales/' . $locale . '.' . i18n::get_current_charset() . '.php';\r
- $locales[] = array( $locale, (!file_exists($checkfile) ? '*' : '') . $native_locales[$locale] );\r
+ $locales[] = array( $locale, (!file_exists($checkfile) ? '* ' : '') . $locale );\r
}\r
?>\r
<div id="container">\r
<div class="prt">\r
<select name="locale">\r
<?php\r
+ // Get the browser language that can be displayed\r
+ // TODO: default locale select simple implementation\r
+ $languages = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\r
+ $language = (is_array($languages) && count($languages) > 0) ? preg_replace('#^([\w]+).*$#', '$1', $languages[0]) : '';\r
+\r
foreach ( $locales as $locale )\r
{\r
echo "<option value=\"$locale[0]\"";\r
}\r
?>\r
</select>\r
- <p>\r
- Locale with an asterisk, because there is no language file for the installation, will be in English.<br />\r
- We will wait for the translator by volunteers!\r
+ <p>Nucleus is installed in the selected locale, the locale of the Asterisk prefixed will be displayed in English because there is no translation of the installer file.</p>\r
+ <p>We will wait for the translator by volunteers!</p>\r
</p>\r
<p class="sbt">\r
<button type="submit" name="action" value="locale" class="sbt_arw">START</button>\r
'../nucleus/libs/MEDIA.php',\r
'../nucleus/libs/MEMBER.php',\r
'../nucleus/libs/NOTIFICATION.php',\r
+ '../nucleus/libs/PAGEFACTORY.php',\r
'../nucleus/libs/PARSER.php',\r
'../nucleus/libs/PLUGIN.php',\r
'../nucleus/libs/PLUGINADMIN.php',\r