From: <var...@us...> - 2020-12-31 18:03:54
|
Revision: 10218 http://sourceforge.net/p/phpwiki/code/10218 Author: vargenau Date: 2020-12-31 18:03:53 +0000 (Thu, 31 Dec 2020) Log Message: ----------- We are in UTF-8; try UTF-8 and utf8 Modified Paths: -------------- trunk/lib/config.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2020-12-31 17:52:38 UTC (rev 10217) +++ trunk/lib/config.php 2020-12-31 18:03:53 UTC (rev 10218) @@ -164,17 +164,15 @@ */ function guessing_setlocale($category, $locale) { - $alt = array('en' => array('C', 'en_US', 'en_GB', 'en_AU', 'en_CA', 'english'), - 'de' => array('de_DE', 'de_DE', 'de_DE@euro', - 'de_AT@euro', 'de_AT', 'German_Austria.1252', 'deutsch', - 'german', 'ge'), + $alt = array( + 'de' => array('de_DE', 'de_AT', 'de_CH', 'deutsch', 'german'), + 'en' => array('en_US', 'en_GB', 'en_AU', 'en_CA', 'en_IE', 'english', 'C'), 'es' => array('es_ES', 'es_MX', 'es_AR', 'spanish'), - 'nl' => array('nl_NL', 'dutch'), - 'fr' => array('fr_FR', 'français', 'french'), - 'it' => array('it_IT'), - 'sv' => array('sv_SE'), - 'ja.utf-8' => array('ja_JP', 'ja_JP.utf-8', 'japanese'), - 'ja.euc-jp' => array('ja_JP', 'ja_JP.eucJP', 'japanese.euc'), + 'fr' => array('fr_FR', 'fr_BE', 'fr_CA', 'fr_CH', 'fr_LU', 'français', 'french'), + 'it' => array('it_IT', 'it_CH', 'italian'), + 'ja' => array('ja_JP', 'japanese'), + 'nl' => array('nl_NL', 'nl_BE', 'dutch'), + 'sv' => array('sv_SE', 'sv_FI', 'swedish'), 'zh' => array('zh_TW', 'zh_CN'), ); if (!$locale or $locale == 'C') { @@ -206,9 +204,12 @@ if ($res = setlocale($category, $try)) return $res; // Try with charset appended... - $try = $try . '.' . 'UTF-8'; - if ($res = setlocale($category, $try)) + $tryutf8 = $try . '.' . 'UTF-8'; + if ($res = setlocale($category, $tryutf8)) return $res; + $tryutf8 = $try . '.' . 'utf8'; + if ($res = setlocale($category, $tryutf8)) + return $res; foreach (array(".", '@', '_') as $sep) { if ($i = strpos($try, $sep)) { $try = substr($try, 0, $i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-01-03 15:23:43
|
Revision: 10221 http://sourceforge.net/p/phpwiki/code/10221 Author: vargenau Date: 2021-01-03 15:23:36 +0000 (Sun, 03 Jan 2021) Log Message: ----------- function guessing_lang needs no parameter Modified Paths: -------------- trunk/lib/config.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2021-01-03 09:46:24 UTC (rev 10220) +++ trunk/lib/config.php 2021-01-03 15:23:36 UTC (rev 10221) @@ -65,15 +65,11 @@ * We should really check additionally if the i18n HomePage version is defined. * So must defer this to the request loop. * - * @param array $languages * @return string */ -function guessing_lang($languages = array()) +function guessing_lang() { - if (!$languages) { - // make this faster - $languages = array("en", "de", "es", "fr", "it", "ja", "zh", "nl", "sv"); - } + $languages = array("en", "de", "es", "fr", "it", "ja", "zh", "nl", "sv"); $accept = false; if (isset($GLOBALS['request'])) // in fixup-dynamic-config there's no request yet This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-10-20 08:07:02
|
Revision: 10638 http://sourceforge.net/p/phpwiki/code/10638 Author: vargenau Date: 2021-10-20 08:07:01 +0000 (Wed, 20 Oct 2021) Log Message: ----------- Set locale correctly for "sv" Modified Paths: -------------- trunk/lib/config.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2021-10-20 07:51:02 UTC (rev 10637) +++ trunk/lib/config.php 2021-10-20 08:07:01 UTC (rev 10638) @@ -82,7 +82,7 @@ case "nl": $loc = "nl_NL"; break; - case "de": + case "sv": $loc = "sv_SE"; break; case "zh": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2022-01-18 14:07:23
|
Revision: 10905 http://sourceforge.net/p/phpwiki/code/10905 Author: vargenau Date: 2022-01-18 14:07:21 +0000 (Tue, 18 Jan 2022) Log Message: ----------- Avoid double slash in Upload URL Modified Paths: -------------- trunk/lib/config.php Modified: trunk/lib/config.php =================================================================== --- trunk/lib/config.php 2022-01-16 19:38:49 UTC (rev 10904) +++ trunk/lib/config.php 2022-01-18 14:07:21 UTC (rev 10905) @@ -153,6 +153,9 @@ return string_ends_with(UPLOAD_DATA_PATH, "/") ? UPLOAD_DATA_PATH : UPLOAD_DATA_PATH . "/"; } - return SERVER_URL . (string_ends_with(DATA_PATH, "/") ? '' : "/") - . DATA_PATH . '/uploads/'; + if (defined('DATA_PATH') && (DATA_PATH != '')) { + return SERVER_URL . (string_ends_with(DATA_PATH, "/") ? '' : "/") . DATA_PATH . '/uploads/'; + } else { + return SERVER_URL . '/uploads/'; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |