Update of /cvsroot/phpwiki/phpwiki In directory usw-pr-cvs1:/tmp/cvs-serv4914 Modified Files: index.php Log Message: Clean up language/locale setting code. I'm sure I broke something (sorry), but it really was a mess. Index: index.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/index.php,v retrieving revision 1.96 retrieving revision 1.97 diff -u -2 -b -p -d -r1.96 -r1.97 --- index.php 12 Sep 2002 11:45:33 -0000 1.96 +++ index.php 18 Sep 2002 18:34:13 -0000 1.97 @@ -473,43 +473,5 @@ define("CHARSET", "iso-8859-1"); // used. // -if (empty($LANG)) $LANG='en'; -//$LANG='nl'; - -// Setting the LANG environment variable (accomplished above) may or -// may not be sufficient to cause PhpWiki to produce dates in your -// native language. (It depends on the configuration of the operating -// system on your http server.) The problem is that, e.g. 'de' is -// often not a valid locale. -// -// A standard locale name is typically of the form -// language[_territory][.codeset][@modifier], where language is -// an ISO 639 language code, territory is an ISO 3166 country code, -// and codeset is a character set or encoding identifier like -// ISO-8859-1 or UTF-8. -// -// You can tailor the locale used for time and date formatting by -// setting the LC_TIME environment variable. You'll have to experiment -// to find the correct setting. -// gettext() fix: With setlocale() we must use the long form, -// like 'de_DE','nl_NL', 'es_MX', 'es_AR', 'fr_FR'. -// For Windows maybe even 'german'. You might fix this accordingly. -// At least on windows the best locale is found automatically, dependent -// on the system locale. -$language_locales = array( - 'en' => 'C', - 'de' => 'de_DE', - 'es' => 'es_MX', - 'nl' => 'nl_NL', - 'fr' => 'fr_FR', - 'it' => 'it_IT', - 'sv' => 'sv_SV' - ); -if (empty($LC_ALL)) { - if (empty($language_locales[$LANG])) - $LC_ALL = $LANG; - else - $LC_ALL = $language_locales[$LANG]; -} -putenv("LC_TIME=$LC_ALL"); +define('DEFAULT_LANGUAGE', 'en'); /* WIKI_PGSRC -- specifies the source for the initial page contents of