From 61fd8b992ac8c4a5c8093934e90ad4b23497853a Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Thu, 23 Feb 2012 19:08:50 +0900 Subject: [PATCH] =?utf8?q?CHANGE:=20=E8=A8=80=E8=AA=9E=EF=BC=88language?= =?utf8?q?=EF=BC=89=E3=81=A8=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F?= =?utf8?q?=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF=E3=83=88=E3=83=AA=E3=83=BB?= =?utf8?q?=E5=AE=9A=E6=95=B0=E3=83=BB=E5=A4=89=E6=95=B0=E3=83=BB=E7=BF=BB?= =?utf8?q?=E8=A8=B3=E3=83=BB=E3=83=89=E3=82=AD=E3=83=A5=E3=83=A1=E3=83=B3?= =?utf8?q?=E3=83=88=E3=82=92=E3=83=AD=E3=82=B1=E3=83=BC=E3=83=AB=EF=BC=88l?= =?utf8?q?ocale=EF=BC=89=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- config.php.sample | 4 +- install/index.php | 8 +-- install/install.sql | 4 +- install/locales/ja_Jpan_JP.UTF-8.php | 3 +- nucleus/documentation/devdocs/plugins.html | 16 ++--- nucleus/documentation/devdocs/sqltables.html | 10 +-- nucleus/documentation/help.html | 4 +- nucleus/documentation/history.html | 24 +++---- nucleus/documentation/index.html | 4 +- nucleus/libs/ADMIN.php | 16 ++--- nucleus/libs/MEMBER.php | 9 +-- nucleus/libs/globalfunctions.php | 78 ++++++++++++---------- nucleus/libs/i18n.php | 6 +- nucleus/locales/bg_Cyrl_BG.ISO-8859-5.php | 8 +-- nucleus/locales/bg_Cyrl_BG.UTF-8.php | 8 +-- nucleus/locales/ca_Latn_ES.ISO-8859-1.php | 8 +-- nucleus/locales/ca_Latn_ES.UTF-8.php | 8 +-- nucleus/locales/cs_Latn_CZ.UTF-8.php | 8 +-- nucleus/locales/cs_Latn_CZ.WINDOWS-1250.php | 8 +-- nucleus/locales/de_Latn_DE.ISO-8859-1.php | 8 +-- nucleus/locales/de_Latn_DE.UTF-8.php | 8 +-- nucleus/locales/en_Latn_US.ISO-8859-1.php | 10 +-- nucleus/locales/en_Latn_US.UTF-8.php | 10 +-- nucleus/locales/es_Latn_ES.ISO-8859-1.php | 8 +-- nucleus/locales/es_Latn_ES.UTF-8.php | 8 +-- nucleus/locales/fa_Arab_IR.UTF-8.php | 8 +-- nucleus/locales/fi_Latn_FI.ISO-8859-1.php | 8 +-- nucleus/locales/fi_Latn_FI.UTF-8.php | 8 +-- nucleus/locales/fr_Latn_FR.ISO-8859-15.php | 8 +-- nucleus/locales/fr_Latn_FR.UTF-8.php | 8 +-- nucleus/locales/gl_Latn_ES.ISO-8859-1.php | 8 +-- nucleus/locales/gl_Latn_ES.UTF-8.php | 8 +-- nucleus/locales/hu_Latn_HU.ISO-8859-2.php | 4 +- nucleus/locales/hu_Latn_HU.UTF-8.php | 4 +- nucleus/locales/it_Latn_IT.ISO-8859-1.php | 8 +-- nucleus/locales/it_Latn_IT.UTF-8.php | 8 +-- nucleus/locales/ja_Jpan_JP.EUC-JP.php | 8 +-- nucleus/locales/ja_Jpan_JP.UTF-8.php | 12 ++-- nucleus/locales/ko_Kore_KR.EUC-KR.php | 4 +- nucleus/locales/ko_Kore_KR.UTF-8.php | 4 +- nucleus/locales/lv_Latn_LV.ISO-8859-13.php | 8 +-- nucleus/locales/lv_Latn_LV.UTF-8.php | 8 +-- nucleus/locales/nl_Latn_NL.ISO-8859-15.php | 8 +-- nucleus/locales/nl_Latn_NL.UTF-8.php | 8 +-- nucleus/locales/pt_Latn_BR.ISO-8859-1.php | 8 +-- nucleus/locales/pt_Latn_BR.UTF-8.php | 8 +-- nucleus/locales/ru_Cyrl_RU.UTF-8.php | 4 +- nucleus/locales/ru_Cyrl_RU.WINDOWS-1251.php | 4 +- nucleus/locales/sk_Latn_SK.ISO-8859-2.php | 8 +-- nucleus/locales/sk_Latn_SK.UTF-8.php | 8 +-- nucleus/locales/zh_Hans_CN.GB2312.php | 8 +-- nucleus/locales/zh_Hans_CN.UTF-8.php | 8 +-- nucleus/locales/zh_Hant_TW.BIG5.php | 8 +-- nucleus/locales/zh_Hant_TW.UTF-8.php | 8 +-- nucleus/plugins/NP_Ping.php | 2 +- nucleus/plugins/NP_SecurityEnforcer.php | 2 +- nucleus/plugins/NP_SkinFiles.php | 2 +- nucleus/plugins/NP_Text.php | 2 +- .../plugins/securityenforcer/en_Latn_US.UTF-8.php | 2 +- .../plugins/securityenforcer/ja_Jpan_JP.EUC-JP.php | 2 +- .../plugins/securityenforcer/ja_Jpan_JP.UTF-8.php | 2 +- nucleus/upgrades/index.php | 10 ++- 62 files changed, 266 insertions(+), 256 deletions(-) diff --git a/config.php.sample b/config.php.sample index 36885fc..f196896 100644 --- a/config.php.sample +++ b/config.php.sample @@ -28,7 +28,7 @@ $DIR_SKINS = '/your/path/to/skins/'; // these dirs are normally subdirs of the nucleus dir, but // you can redefine them if you wish $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/'; -$DIR_LANG = $DIR_NUCLEUS . 'language/'; +$DIR_LOCALES = $DIR_NUCLEUS . 'locales/'; $DIR_LIBS = $DIR_NUCLEUS . 'libs/'; if (!@file_exists($DIR_LIBS . 'globalfunctions.php')) { @@ -39,4 +39,4 @@ if (!@file_exists($DIR_LIBS . 'globalfunctions.php')) { // include libs include($DIR_LIBS.'globalfunctions.php'); -?> \ No newline at end of file +?> diff --git a/install/index.php b/install/index.php index f731db1..61704de 100644 --- a/install/index.php +++ b/install/index.php @@ -814,7 +814,7 @@ function doInstall() $DIR_MEDIA = $config_mediapath; $DIR_SKINS = $config_skinspath; $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/'; - $DIR_LANG = $DIR_NUCLEUS . 'language/'; + $DIR_LOCALES = $DIR_NUCLEUS . 'locales/'; $DIR_LIBS = $DIR_NUCLEUS . 'libs/'; // close database connection (needs to be closed if we want to include globalfunctions.php) @@ -874,7 +874,7 @@ function doInstall() $config_data .= " // these dirs are normally sub dirs of the nucleus dir, but \n"; $config_data .= " // you can redefine them if you wish\n"; $config_data .= " \$DIR_PLUGINS = \$DIR_NUCLEUS . 'plugins/';\n"; - $config_data .= " \$DIR_LANG = \$DIR_NUCLEUS . 'language/';\n"; + $config_data .= " \$DIR_LOCALES = \$DIR_NUCLEUS . 'locales/';\n"; $config_data .= " \$DIR_LIBS = \$DIR_NUCLEUS . 'libs/';\n"; $config_data .= "\n"; $config_data .= " // include libs\n"; @@ -944,7 +944,7 @@ function doInstall() // these dirs are normally sub dirs of the nucleus dir, but // you can redefine them if you wish $DIR_PLUGINS = $DIR_NUCLEUS . 'plugins/'; - $DIR_LANG = $DIR_NUCLEUS . 'language/'; + $DIR_LOCALES = $DIR_NUCLEUS . 'locales/'; $DIR_LIBS = $DIR_NUCLEUS . 'libs/'; // include libs @@ -1366,4 +1366,4 @@ exit; /* for the non-php systems that decide to show the contents: ?> ウェブサーバから /install/ ディレクトリを削除してください:

'); define('_TEXT15_L1', 'install/install.sql:テーブルの構造を内包するファイル'); define('_TEXT15_L2', 'install/index.php:このファイル'); -//define('_TEXT15_L3', 'install_lang_japanese.php:インストーラの言語ファイル'); -define('_TEXT15_L3', 'install/install_lang_japanese.php:インストーラの言語ファイル'); +define('_TEXT15_L3', 'install/locale/ja_Jpan_JP.UTF-8.php:インストーラの言語ファイル'); define('_TEXT16', '

もしこのディレクトリを削除していなければ、管理領域を開くことができません。

'); define('_HEADER11', 'ウェブサイトの確認'); diff --git a/nucleus/documentation/devdocs/plugins.html b/nucleus/documentation/devdocs/plugins.html index 0abaf3a..bcc0c16 100644 --- a/nucleus/documentation/devdocs/plugins.html +++ b/nucleus/documentation/devdocs/plugins.html @@ -2197,16 +2197,16 @@ Thanks to Andy Matsubara for the instructions.

  1. Develop your plugin -At first, it is easier to develop it in your language. Use of language files is recommended after the plugin becomes stable.
  2. +At first, it is easier to develop it in your language. Use of translation files is recommended after the plugin becomes stable.
  3. Create plugin directory If your plugin name is NP_AbcDef, the plugin directory name is abcdef (always lower case).
  4. -
  5. Create language files +
  6. Create translation files -Create the language files in the directory of your plugin. The name of the language file must be the same as that of the Nucleus language file name. For example, english.php is for English and default use. japanese-utf8.php for Japanese(UTF-Cool,japanese-euc.php for Japanese(EUC-JP).
  7. +Create the translation files in the directory of your plugin. The name of the language file must be the same as that of the Nucleus language file name. For example, english.php is for English and default use. japanese-utf8.php for Japanese(UTF-Cool,japanese-euc.php for Japanese(EUC-JP).
  8. Define strings -Define strings like below in the language file: +Define strings like below in the translation file:
    <?php
     define('_ABCDEF_MESSAGENAME',                  'actual strings in the language');
    @@ -2216,13 +2216,13 @@ define('_ABCDEF_MESSAGENAME',                  'actual strings in the language')
     You have to define them for all static strings in your plugin. As defined name is used globally in the environment, it is recommended to have a prefix derived from the plugin name(in this case _ABCDEF).
  9. Replace static strings -Replace static strings in your plugin with the defined names so they will change according to the language file.
  10. +Replace static strings in your plugin with the defined names so they will change according to the translation file.
  11. Create init method Make the init method in the plugin like below
       function init() {
    -      // include language file for this plugin
    +      // include translation file for this plugin
           $language = preg_replace( '#[\\|/]#', '', getLanguageName());
           if (file_exists($this->getDirectory().$language.'.php'))
              include_once($this->getDirectory().$language.'.php');
    @@ -2230,8 +2230,8 @@ Make the init method in the plugin like below
              include_once($this->getDirectory().'english.php');
        }
  12. -This logic is same as Nucleus' language file setting. -
  13. Add language files +This logic is same as Nucleus' translation file setting. +
  14. Add translation files As English is the default language, it is recommended to have at least the English version.
diff --git a/nucleus/documentation/devdocs/sqltables.html b/nucleus/documentation/devdocs/sqltables.html index cf95f07..4ae3389 100644 --- a/nucleus/documentation/devdocs/sqltables.html +++ b/nucleus/documentation/devdocs/sqltables.html @@ -551,10 +551,10 @@ This document contains information on the fields inside the Nucleus database tab A copy of the key that is stored in the users cookie. This key is used to log on. When a member logs on, a random cookiekey is generated. One copy goes into the database, another one goes into a cookie on the users computer. (together with the username). - deflang + mlocale varchar(20) '' - Language file to use for this member. When empty, uses the default site language. + translation file to use for this member. When empty, uses the default site locale. @@ -994,9 +994,9 @@ This document contains information on the fields inside the Nucleus database tab URL of website. Should end with a slash. - Language - english - Language file to use by default. A file languagename.php must exist in the languages directory. + Locale + en_Latn_US + Locale file to use by default. A file localename.php must exist in the locale directory. SessionCookie 0 diff --git a/nucleus/documentation/help.html b/nucleus/documentation/help.html index 1a3ebcd..b4ee7bc 100644 --- a/nucleus/documentation/help.html +++ b/nucleus/documentation/help.html @@ -322,7 +322,7 @@ Next to that, logged in members can override this setting if they want to. When both of these settings are invalid, 'english' is used as the default language.

-

Note: Extra language files can be downloaded from the Nucleus Website. (opens a new window)

+

Note: Extra translation files can be downloaded from the Nucleus Website. (opens a new window)

@@ -2302,7 +2302,7 @@ all

Skinvar: charset

-

Inserts the character set encoding used by the current language file.

+

Inserts the character set encoding used by the current translation file.

Arguments

diff --git a/nucleus/documentation/history.html b/nucleus/documentation/history.html index 22443ee..5caa213 100644 --- a/nucleus/documentation/history.html +++ b/nucleus/documentation/history.html @@ -173,9 +173,9 @@ Nucleus v3.41 (March 15, 2009)