From ff24ed3bcc9ea06e6fddfa936d13862c66d54a5f Mon Sep 17 00:00:00 2001 From: henoheno Date: Sat, 16 Oct 2004 14:48:53 +0900 Subject: [PATCH] BugTrack/579 Move language settings into language resources together --- en.lng | 12 +++++++++++- ja.lng | 17 ++++++++++++++++- lib/init.php | 20 ++++++++++---------- pukiwiki.ini.php | 11 ++++------- 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/en.lng b/en.lng index 529945d..9c65d76 100644 --- a/en.lng +++ b/en.lng @@ -2,10 +2,20 @@ ///////////////////////////////////////////////// // PukiWiki - Yet another WikiWikiWeb clone. // -// $Id: en.lng,v 1.27 2004/10/11 02:05:12 henoheno Exp $ +// $Id: en.lng,v 1.28 2004/10/16 05:45:13 henoheno Exp $ // // PukiWiki message file (english) +///////////////////////////////////////////////// +// Encode setting +// NOTE: Encoding of this file, must equal to this setting + +// Internal content encoding = Output content charset (for skin) +define('CONTENT_CHARSET', 'iso-8859-1'); // 'UTF-8' or 'iso-8859-1' or 'EUC-JP' or ... + +// Internal content encoding (for mbstring) +define('SOURCE_ENCODING', 'ASCII'); // 'UTF-8' or 'ASCII' or 'EUC-JP' + /////////////////////////////////////// // page titles $_title_cannotedit = ' $1 is not editable'; diff --git a/ja.lng b/ja.lng index 7db70f3..01ab8c1 100644 --- a/ja.lng +++ b/ja.lng @@ -2,10 +2,25 @@ ///////////////////////////////////////////////// // PukiWiki - Yet another WikiWikiWeb clone. // -// $Id: ja.lng,v 1.26 2004/10/11 02:05:12 henoheno Exp $ +// $Id: ja.lng,v 1.27 2004/10/16 05:45:13 henoheno Exp $ // // PukiWiki message file (japanese) +///////////////////////////////////////////////// +// ½é´üÀßÄê (ʸ»ú¥¨¥ó¥³¡¼¥É) +// ¢¨¤³¤Î¥Õ¥¡¥¤¥ë¤Îʸ»ú¥³¡¼¥É¤Ï¡¢°Ê²¼¤ÎÀßÄê¤È°ìÃ× +// ¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹ + +$encode = 'EUC-JP'; + +// Internal content encoding = Output content charset (for skin) +define('CONTENT_CHARSET', $encode); // 'UTF-8' or 'iso-8859-1' or 'EUC-JP' or ... + +// Internal content encoding (for mbstring) +define('SOURCE_ENCODING', $encode); // 'UTF-8' or 'ASCII' or 'EUC-JP' + +unset($encode); + /////////////////////////////////////// // page titles $_title_cannotedit = '$1 ¤ÏÊÔ½¸¤Ç¤­¤Þ¤»¤ó'; diff --git a/lib/init.php b/lib/init.php index e9a0a24..6224b0d 100644 --- a/lib/init.php +++ b/lib/init.php @@ -2,7 +2,7 @@ ///////////////////////////////////////////////// // PukiWiki - Yet another WikiWikiWeb clone. // -// $Id: init.php,v 1.12 2004/10/11 03:13:09 henoheno Exp $ +// $Id: init.php,v 1.13 2004/10/16 05:48:53 henoheno Exp $ // ///////////////////////////////////////////////// @@ -51,15 +51,6 @@ if (! file_exists(INI_FILE) || ! is_readable(INI_FILE)) { if ($die) die_message(nl2br("\n\n" . $die)); ///////////////////////////////////////////////// -// INI_FILE: mbstring extension ´ØÏ¢ - -mb_language('Japanese'); -mb_internal_encoding(SOURCE_ENCODING); -ini_set('mbstring.http_input', 'pass'); -mb_http_output('pass'); -mb_detect_order('auto'); - -///////////////////////////////////////////////// // INI_FILE: LANG ½é´üÀßÄê(¸À¸ì¥Õ¥¡¥¤¥ë¤Î¾ì½ê) define('LANG_FILE', DATA_HOME . LANG . '.lng'); @@ -73,6 +64,15 @@ if (! file_exists(LANG_FILE) || ! is_readable(LANG_FILE)) { if ($die) die_message(nl2br("\n\n" . $die)); ///////////////////////////////////////////////// +// INI_FILE / LANG_FILE: mbstring extension ´ØÏ¢ + +mb_language('Japanese'); +mb_internal_encoding(SOURCE_ENCODING); +ini_set('mbstring.http_input', 'pass'); +mb_http_output('pass'); +mb_detect_order('auto'); + +///////////////////////////////////////////////// // LANG_FILE: ÍËÆüÇÛÎó $weeklabels = $_msg_week; diff --git a/pukiwiki.ini.php b/pukiwiki.ini.php index e52a443..43779e1 100644 --- a/pukiwiki.ini.php +++ b/pukiwiki.ini.php @@ -2,7 +2,7 @@ ///////////////////////////////////////////////// // PukiWiki - Yet another WikiWikiWeb clone. // -// $Id: pukiwiki.ini.php,v 1.87 2004/10/16 04:14:00 henoheno Exp $ +// $Id: pukiwiki.ini.php,v 1.88 2004/10/16 05:45:13 henoheno Exp $ // // PukiWiki setting file @@ -11,13 +11,10 @@ // Internal Language ('en' or 'ja') define('LANG', 'ja'); // For internal messages -if (! defined('SKIN_LANG')) define('SKIN_LANG', 'ja'); // For skin -// Internal content encoding (for mbstring) -define('SOURCE_ENCODING', 'EUC-JP'); // 'UTF-8' or 'ASCII' or 'EUC-JP' - -// Internal content encoding = Output content charset (for skin) -define('CONTENT_CHARSET', 'EUC-JP'); // 'UTF-8' or 'iso-8859-1' or 'EUC-JP' +// Skin UI Language ('en' or 'ja') +if (! defined('SKIN_LANG')) + define('SKIN_LANG', 'ja'); ///////////////////////////////////////////////// // ¥Ç¥£¥ì¥¯¥È¥ê»ØÄê ºÇ¸å¤Ë / ¤¬É¬Í× Â°À­¤Ï 777 -- 2.11.0