--- nfo/php/libs/org.netfrag.flib/Site.php 2003/02/09 17:29:02 1.6 +++ nfo/php/libs/org.netfrag.flib/Site.php 2005/08/11 14:07:45 1.9 @@ -1,8 +1,17 @@ actually wire the locale-text setting to $app->l10n->getLocaleKey() (the other way round....) $langkey = $this->localetext->getCurrentLanguage(); + + $ident = $_GET[x]; + // fallback to post + if (!$ident) { $ident = $_POST[x]; } + if($langkey == "de") { - setlocale (LC_ALL, 'de_DE'); + if(($ident == '/terminal/deposit/' || $ident == '/terminal/ss_success/') && $this->session->get('validTerminal')) { + if(!setlocale (LC_ALL, 'en_US')) { + // needed at e.g. FreeBSD + setlocale (LC_ALL, 'en_US.ISO_8859-1'); + } + } else { + if(!setlocale (LC_ALL, 'de_DE')) { + // needed at e.g. FreeBSD + setlocale (LC_ALL, 'de_DE.ISO_8859-1'); + } + } } elseif($langkey == "en") { - setlocale (LC_ALL, 'en_US'); + if(!setlocale (LC_ALL, 'en_US')) { + // needed at e.g. FreeBSD + setlocale (LC_ALL, 'en_US.ISO_8859-1'); + } } elseif($langkey == "tr") { - setlocale (LC_ALL, 'tr_TR'); + if(($ident == '/terminal/deposit/' || $ident == '/terminal/ss_success/') && $this->session->get('validTerminal')) { + //if($_POST[xsend] && $this->session->get('validTerminal')) { + if(!setlocale (LC_ALL, 'en_US')) { + // needed at e.g. FreeBSD + setlocale (LC_ALL, 'en_US.ISO_8859-1'); + } + } else { + if(!setlocale (LC_ALL, 'tr_TR')) { + // needed at e.g. FreeBSD + setlocale (LC_ALL, 'tr_TR.ISO_8859-1'); + } + } } }