Commit ec6cc97d645f52ca4aff55d431dc06ca3e7f7960
1 parent
c8355981
Reinstate language negotiation with the browser.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4460 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
4 additions
and
5 deletions
config/dmsDefaults.php
| ... | ... | @@ -105,14 +105,13 @@ class KTInit { |
| 105 | 105 | * |
| 106 | 106 | */ |
| 107 | 107 | function setupI18n () { |
| 108 | + require_once(KT_LIB_DIR . '/i18n/i18nutil.inc.php'); | |
| 109 | + require_once("HTTP.php"); | |
| 108 | 110 | global $default; |
| 109 | 111 | if (in_array("gettext", get_loaded_extensions()) && function_exists('gettext') && function_exists('_')) { |
| 110 | - require_once("$default->fileSystemRoot/lib/i18n/languageFunctions.inc"); | |
| 111 | - // require_once("$default->fileSystemRoot/lib/i18n/accept-to-gettext.inc"); | |
| 112 | 112 | if ($default->useAcceptLanguageHeader) { |
| 113 | - $aInstalledLocales = getInstalledLocales(); | |
| 114 | - //$sLocale=al2gt($aInstalledLocales, 'text/html'); | |
| 115 | - $sLocale = 'en_ZA'; | |
| 113 | + $aInstalledLocales = KTi18nUtil::getInstalledLocales(); | |
| 114 | + $sLocale = $aInstalledLocales[HTTP::negotiateLanguage($aInstalledLocales)]; | |
| 116 | 115 | $default->defaultLanguage = $sLocale; |
| 117 | 116 | } |
| 118 | 117 | putenv('LANG=' . $default->defaultLanguage); | ... | ... |