From: <tr...@us...> - 2013-02-10 00:51:17
|
Revision: 11012 http://sourceforge.net/p/xoops/svn/11012 Author: trabis Date: 2013-02-10 00:51:04 +0000 (Sun, 10 Feb 2013) Log Message: ----------- Integrating locale in xoops configs Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/extras/altsys_functions.php XoopsCore/branches/2.6.x/2.6.0/extras/login.php XoopsCore/branches/2.6.x/2.6.0/extras/modules/system/admin/filemanager/jquery.php XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/tinymce/formtinymce.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/class/installwizard.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/support.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_configsite.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_extensioninstaller.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_langselect.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_siteinit.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_tablesfill.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php XoopsCore/branches/2.6.x/2.6.0/htdocs/locale/en_US/en_US.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/codex/locale.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/plugins/legacy/render.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/logger/preloads/core.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/menus/class/decorator.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/notifications/class/helper.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/pdf/class/pdf.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/protector/class/gtickets.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/publisher/backend.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/preferences/main.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/admin/tplsets/jquery.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/form/preferences.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/include/install.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/locale/en_US/en_US.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/userconfigs/class/form/configs.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/admin/header.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/api.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/form/language.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/class/xlanguage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/functions.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/xlanguage/include/vars.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale/Abstract.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale/Mailer/Abstract.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops/Locale.php XoopsCore/branches/2.6.x/2.6.0/htdocs/xoops_lib/Xoops.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectlocale.php XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/_global.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/locale/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/locale/en_US/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/locale/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/locale/en_US/ Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/themes/default/locale/english/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/language/ XoopsCore/branches/2.6.x/2.6.0/htdocs/themes/default/locale/english/ Modified: XoopsCore/branches/2.6.x/2.6.0/extras/altsys_functions.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/extras/altsys_functions.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/extras/altsys_functions.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -1,4 +1,5 @@ <?php +//todo, check this file altsys_set_module_config(); Modified: XoopsCore/branches/2.6.x/2.6.0/extras/login.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/extras/login.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/extras/login.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -22,7 +22,7 @@ <html> <head> <meta http-equiv="content-type" content="text/html; charset=' . XoopsLocale::getCharset() . '" /> - <meta http-equiv="content-language" content="' . _LANGCODE . '" /> + <meta http-equiv="content-language" content="' . XoopsLocale::getLangCode() . '" /> <title>' . $xoopsConfig['sitename'] . '</title> <link rel="stylesheet" type="text/css" media="all" href="' . XOOPS_URL . '/xoops.css" /> '; Modified: XoopsCore/branches/2.6.x/2.6.0/extras/modules/system/admin/filemanager/jquery.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/extras/modules/system/admin/filemanager/jquery.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/extras/modules/system/admin/filemanager/jquery.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -104,7 +104,7 @@ </button>'; $verif = true; $protected = array( - '', 'class', 'Frameworks', 'images', 'include', 'kernel', 'language', 'modules', 'themes', + '', 'class', 'Frameworks', 'images', 'include', 'kernel', 'language', 'locale', 'modules', 'themes', 'uploads', 'xoops_lib', 'xoops_data' ); foreach ($protected as $folder) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/admin.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -81,7 +81,7 @@ $rssurl[] = 'http://sourceforge.net/export/rss2_projnews.php?group_id=41586&rss_fulltext=1'; $rssurl[] = 'http://www.xoops.org/backend.php'; $rssurl = array_unique(array_merge($rssurl, XoopsLocale::getAdminRssUrls())); - $rssfile = 'adminnews-' . $xoops->getConfig('language'); + $rssfile = 'adminnews-' . $xoops->getConfig('locale'); $items = array(); if (!$items = Xoops_Cache::read($rssfile)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/backend.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -48,7 +48,7 @@ $tpl->assign('channel_editor', $xoops->checkEmail($xoops->getConfig('adminmail'), true)); $tpl->assign('channel_category', 'News'); $tpl->assign('channel_generator', 'XOOPS'); - $tpl->assign('channel_language', _LANGCODE); + $tpl->assign('channel_language', XoopsLocale::getLangCode()); $xoTheme = $xoops->theme(); $imgPath = $xoTheme->resourcePath('/images/logo.png'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/captcha/config.recaptcha.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -27,5 +27,5 @@ 'private_key' => 'YourPrivateApiKey', 'public_key' => 'YourPublicApiKey', 'theme' => 'white', // 'red' | 'white' | 'blackglass' | 'clean' | 'custom' - 'lang' => _LANGCODE + 'lang' => XoopsLocale::getLangCode() ); \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/mail/xoopsmultimailer.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -138,14 +138,6 @@ $this->Sendmail = $xoopsMailerConfig['sendmailpath']; $this->Host = implode(';', $xoopsMailerConfig['smtphost']); } - $this->CharSet = strtolower(XoopsLocale::getCharset()); - $xoopsLanguage = preg_replace('/[^a-zA-Z0-9_-]/', '', $xoops->getConfig('language')); - if (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/language/' . $xoopsLanguage . '/phpmailer.php')) { - include XOOPS_ROOT_PATH . '/language/' . $xoopsLanguage . '/phpmailer.php'; - $this->language = $PHPMAILER_LANG; - } else { - $this->SetLanguage('en', XOOPS_ROOT_PATH . '/class/mail/phpmailer/language/'); - } $this->PluginDir = XOOPS_ROOT_PATH . '/class/mail/phpmailer/'; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/moduleadmin.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -504,12 +504,11 @@ } } $changelog = ''; - $language = $xoops->getConfig('language'); - if (!is_file(XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt")) { - $language = 'english'; + $language = $xoops->getConfig('locale'); + if (!is_file(XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/locale/" . $language . "/changelog.txt")) { + $language = 'en_US'; } - $language = empty($language) ? $xoops->getConfig('language') : $language; - $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/language/" . $language . "/changelog.txt"; + $file = XOOPS_ROOT_PATH . "/modules/" . $this->_obj->getVar("dirname") . "/locale/" . $language . "/changelog.txt"; if (is_readable($file)) { $changelog = utf8_encode(implode("<br />", file($file))) . "\n"; } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -54,7 +54,7 @@ $this->Smarty(); $this->setCompileId(); $this->assign( - array('xoops_url' => XOOPS_URL, 'xoops_rootpath' => XOOPS_ROOT_PATH, 'xoops_langcode' => _LANGCODE, 'xoops_charset' => XoopsLocale::getCharset(), 'xoops_version' => XOOPS_VERSION, 'xoops_upload_url' => XOOPS_UPLOAD_URL) + array('xoops_url' => XOOPS_URL, 'xoops_rootpath' => XOOPS_ROOT_PATH, 'xoops_langcode' => XoopsLocale::getLangCode(), 'xoops_charset' => XoopsLocale::getCharset(), 'xoops_version' => XOOPS_VERSION, 'xoops_upload_url' => XOOPS_UPLOAD_URL) ); } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -335,7 +335,7 @@ // Other assigns $assigns = array( - 'title', 'slogan', 'language', 'footer', 'jquery_theme', 'startpage' + 'title', 'slogan', 'locale', 'footer', 'jquery_theme', 'startpage' ); foreach ($assigns as $name) { // prefix each tag with 'xoops_' @@ -398,7 +398,7 @@ if (empty($extraString)) { if (empty($extra_string)) { // Generate language section - $extra_string = $xoops->getConfig('language'); + $extra_string = $xoops->getConfig('locale'); // Generate group section if (!$xoops->isUser()) { $extra_string .= '-' . XOOPS_GROUP_ANONYMOUS; @@ -544,18 +544,18 @@ public function loadLocalization($type = "main") { $xoops = Xoops::getInstance(); - $language = $xoops->getConfig('language'); + $language = $xoops->getConfig('locale'); // Load global localization stylesheet if available - if (XoopsLoad::fileExists($xoops->path('language/' . $language . '/style.css'))) { - $this->addStylesheet($xoops->url('language/' . $language . '/style.css')); + if (XoopsLoad::fileExists($xoops->path('locale/' . $language . '/style.css'))) { + $this->addStylesheet($xoops->url('locale/' . $language . '/style.css')); } $this->addLanguage($type); // Load theme localization stylesheet and scripts if available - if (XoopsLoad::fileExists($this->path . '/language/' . $language . '/script.js')) { - $this->addScript($this->url . '/language/' . $language . '/script.js'); + if (XoopsLoad::fileExists($this->path . '/locale/' . $language . '/script.js')) { + $this->addScript($this->url . '/locale/' . $language . '/script.js'); } - if (XoopsLoad::fileExists($this->path . '/language/' . $language . '/style.css')) { - $this->addStylesheet($this->url . '/language/' . $language . '/style.css'); + if (XoopsLoad::fileExists($this->path . '/locale/' . $language . '/style.css')) { + $this->addStylesheet($this->url . '/locale/' . $language . '/style.css'); } return true; } @@ -571,9 +571,9 @@ public function addLanguage($type = "main", $language = null) { $xoops = Xoops::getInstance(); - $language = is_null($language) ? $xoops->getConfig('language') : $language; - if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/language/{$language}/{$type}.php")))) { - if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/language/english/{$type}.php")))) { + $language = is_null($language) ? $xoops->getConfig('locale') : $language; + if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/locale/{$language}/{$type}.php")))) { + if (!XoopsLoad::fileExists($file = $xoops->path($this->resourcePath("/locale/en_US/{$type}.php")))) { return false; } } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/tinymce/formtinymce.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/tinymce/formtinymce.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -96,7 +96,7 @@ if (defined("_XOOPS_EDITOR_TINYMCE_LANGUAGE")) { $this->language = strtolower(constant("_XOOPS_EDITOR_TINYMCE_LANGUAGE")); } else { - $this->language = str_replace('_', '-', strtolower(_LANGCODE)); + $this->language = str_replace('_', '-', strtolower(XoopsLocale::getLangCode())); if (strtolower(XoopsLocale::getCharset()) == "utf-8") { $this->language .= "_utf8"; } Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopseditor/xoopseditor.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -190,7 +190,7 @@ $order = array(); $_list = XoopsLists::getDirListAsArray($this->root_path . '/'); foreach ($_list as $item) { - if (XoopsLoad::fileExists($file = $this->root_path . '/' . $item . '/language/' . $xoops->getConfig('language') . '.php')) { + if (XoopsLoad::fileExists($file = $this->root_path . '/' . $item . '/language/' . XoopsLocale::getLegacyLanguage() . '.php')) { include_once $file; } else { if (XoopsLoad::fileExists($file = $this->root_path . '/' . $item . '/language/english.php')) { @@ -249,7 +249,7 @@ return $editor; } $editor_path = $this->root_path . '/' . $name; - if (XoopsLoad::fileExists($file = $editor_path . '/language/' . $xoops->getConfig('language') . '.php')) { + if (XoopsLoad::fileExists($file = $editor_path . '/language/' . XoopsLocale::getLegacyLanguage() . '.php')) { include_once $file; } else { if (XoopsLoad::fileExists($file = $editor_path . '/language/english.php')) { Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectlocale.php (from rev 11006, XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectlang.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectlocale.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsform/formselectlocale.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -0,0 +1,45 @@ +<?php +/* + You may not change or alter any portion of this comment or credits + of supporting developers from this source code or any supporting source code + which is considered copyrighted (c) material of the original comment or credit authors. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/** + * XOOPS form element of select locale + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package class + * @subpackage xoopsform + * @since 2.6.0 + * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ + * @version $Id$ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * A select field with available locales + */ +class XoopsFormSelectLocale extends XoopsFormSelect +{ + /** + * Constructor + * + * @param string $caption + * @param string $name + * @param mixed $value Pre-selected value (or array of them). + * Legal is any name of a XOOPS_ROOT_PATH."/locale/" subdirectory. + * @param int $size Number of rows. "1" makes a drop-down-list. + */ + public function __construct($caption, $name, $value = null, $size = 1) + { + parent::__construct($caption, $name, $value, $size); + $this->addOptionArray(XoopsLists::getLocaleList()); + } +} \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -250,7 +250,7 @@ * gets list of all avatar image files inside default avatars directory * * @static - * @return array|false + * @return array|bool */ static function getAllAvatarsList() { @@ -299,6 +299,18 @@ } /** + * gets list of locale folders inside default language directory + * + * @static + * @return array + */ + public static function getLocaleList() + { + $lang_list = XoopsLists::getDirListAsArray(XOOPS_ROOT_PATH . '/locale/'); + return $lang_list; + } + + /** * XoopsLists::getCountryList() * * @static Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -314,6 +314,7 @@ 'xoopsformselecteditor' => XOOPS_ROOT_PATH . '/class/xoopsform/formselecteditor.php', 'xoopsformselectgroup' => XOOPS_ROOT_PATH . '/class/xoopsform/formselectgroup.php', 'xoopsformselectlang' => XOOPS_ROOT_PATH . '/class/xoopsform/formselectlang.php', + 'xoopsformselectlocale' => XOOPS_ROOT_PATH . '/class/xoopsform/formselectlocale.php', 'xoopsformselectmatchoption' => XOOPS_ROOT_PATH . '/class/xoopsform/formselectmatchoption.php', 'xoopsformselecttheme' => XOOPS_ROOT_PATH . '/class/xoopsform/formselecttheme.php', 'xoopsformselecttimezone' => XOOPS_ROOT_PATH . '/class/xoopsform/formselecttimezone.php', Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -230,16 +230,16 @@ { $xoops = Xoops::getInstance(); if (!$path = $this->templatedir) { - $path = XOOPS_ROOT_PATH . "/language/"; + $path = XOOPS_ROOT_PATH . "/locale/"; } elseif (false === strpos($path, '/')) { - $path = XOOPS_ROOT_PATH . "/modules/" . $path . "/language/"; + $path = XOOPS_ROOT_PATH . "/modules/" . $path . "/locale/"; } elseif (substr($path, -1, 1) != "/") { $path .= "/"; } - if (XoopsLoad::fileExists($path . $xoops->getConfig('language') . "/mail_template/" . $this->template)) { - return $path . $xoops->getConfig('language') . "/mail_template/" . $this->template; - } elseif (XoopsLoad::fileExists($path . "english/mail_template/" . $this->template)) { - return $path . "english/mail_template/" . $this->template; + if (XoopsLoad::fileExists($path . $xoops->getConfig('locale') . "/templates/" . $this->template)) { + return $path . $xoops->getConfig('locale') . "/templates/" . $this->template; + } elseif (XoopsLoad::fileExists($path . "en_US/templates/" . $this->template)) { + return $path . "en_US/templates/" . $this->template; } elseif (XoopsLoad::fileExists($path . $this->template)) { return $path . $this->template; } else { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/include/common.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -128,8 +128,9 @@ /** * Load Language settings and defines */ -$xoops->loadLanguage('global'); $xoops->loadLocale(); +//For legacy +$xoops->setConfig('language', XoopsLocale::getLegacyLanguage()); date_default_timezone_set(XoopsLocale::getTimezone()); setlocale(LC_ALL, XoopsLocale::getLocale()); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/class/installwizard.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/class/installwizard.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/class/installwizard.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -27,7 +27,7 @@ /** * @var string */ - public $language = 'english'; + public $language = 'en_US'; /** * @var array @@ -61,12 +61,14 @@ } // Load the main language file - $this->initLanguage(!empty($_COOKIE['xo_install_lang']) ? $_COOKIE['xo_install_lang'] : 'english'); + $this->initLanguage(!empty($_COOKIE['xo_install_lang']) ? $_COOKIE['xo_install_lang'] : 'en_US'); // Setup pages + $pages = array(); include_once dirname(dirname(__FILE__)) . '/include/page.php'; $this->pages = $pages; // Load default configs + $configs = array(); include_once dirname(dirname(__FILE__)) . '/include/config.php'; $this->configs = $configs; @@ -133,10 +135,10 @@ */ public function loadLangFile($file) { - if (file_exists($file = XOOPS_INSTALL_PATH . "/language/{$this->language}/{$file}.php")) { + if (file_exists($file = XOOPS_INSTALL_PATH . "/locale/{$this->language}/{$file}.php")) { include_once $file; } else { - $file = XOOPS_INSTALL_PATH . "/language/english/{$file}.php"; + $file = XOOPS_INSTALL_PATH . "/locale/en_US/{$file}.php"; include_once $file; } } @@ -149,17 +151,11 @@ public function initLanguage($language) { $language = preg_replace("/[^a-z0-9_\-]/i", "", $language); - if (!file_exists(XOOPS_INSTALL_PATH . "/language/{$language}/install.php")) { - $language = 'english'; + if (!file_exists(XOOPS_INSTALL_PATH . "/locale/{$language}/install.php")) { + $language = 'en_US'; } $this->language = $language; $this->loadLangFile('install'); - - if (file_exists($file = XOOPS_ROOT_PATH . "/language/{$language}/global.php")) { - include_once $file; - } else { - include_once XOOPS_ROOT_PATH . "/language/english/global.php"; - } } /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/config.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -34,11 +34,6 @@ 'sitename', 'slogan', 'allow_register', 'meta_keywords', 'meta_description', 'meta_author', 'meta_copyright', ); -// languages config files -$configs['language_files'] = array( - 'global', -); - // extension_loaded $configs['extensions'] = array( 'mbstring' => array('MBString', sprintf(PHP_EXTENSION, CHAR_ENCODING)), Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/createconfigform.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -45,7 +45,7 @@ $ret[$conf_catid] = new XoopsThemeForm('', 'configs', 'index.php', 'post'); } - $title = constant($config[$i]->getVar('conf_title')); + $title = Xoops_Locale::translate($config[$i]->getVar('conf_title'), 'system'); switch ($config[$i]->getVar('conf_formtype')) { @@ -113,6 +113,10 @@ $ele = new XoopsFormSelectLang($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); break; + case 'locale': + $ele = new XoopsFormSelectLocale($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); + break; + case 'startpage': $ele = new XoopsFormSelect($title, $config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()); $module_handler = $xoops->getHandlerModule(); @@ -210,8 +214,8 @@ break; } - if (defined($config[$i]->getVar('conf_desc')) && constant($config[$i]->getVar('conf_desc')) != '') { - $ele->setDescription(constant($config[$i]->getVar('conf_desc'))); + if ($config[$i]->getVar('conf_desc') != '') { + $ele->setDescription(Xoops_Locale::translate($config[$i]->getVar('conf_desc'), 'system')); } $ret[$conf_catid]->addElement($ele); @@ -231,7 +235,7 @@ */ function createThemeform(XoopsConfigItem $config) { - $title = (!defined($config->getVar('conf_desc')) || constant($config->getVar('conf_desc')) == '') ? constant($config->getVar('conf_title')) : constant($config->getVar('conf_title')) . '<br /><br /><span>' . constant($config->getVar('conf_desc')) . '</span>'; + $title = $config->getVar('conf_desc') == '' ? Xoops_Locale::translate($config->getVar('conf_title'), 'system') : Xoops_Locale::translate($config->getVar('conf_title'), 'system') . '<br /><br /><span>' . Xoops_Locale::translate($config->getVar('conf_desc'), 'system') . '</span>'; $form_theme_set = new XoopsFormSelect('', $config->getVar('conf_name'), $config->getConfValueForOutput(), 1, false); $dirlist = XoopsLists::getThemesList(); if (!empty($dirlist)) { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/include/install_tpl.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -96,8 +96,8 @@ <link rel="shortcut icon" type="image/ico" href="../favicon.ico"/> <link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="css/style.css"/> <?php - if (file_exists('language/' . $wizard->language . '/style.css')) { - echo '<link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="language/' . $wizard->language . '/style.css" />'; + if (file_exists('locale/' . $wizard->language . '/style.css')) { + echo '<link charset="UTF-8" rel="stylesheet" type="text/css" media="all" href="locale/' . $wizard->language . '/style.css" />'; } ?> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/install.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/install.php 2013-02-07 15:10:40 UTC (rev 11006) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/install.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -18,7 +18,6 @@ // _CHARSET : UTF-8 // Translator: XOOPS Translation Team -define("SHOW_HIDE_HELP", "Show/hide help text"); // Configuration check page define("SERVER_API", "Server API"); @@ -27,9 +26,7 @@ define("XML_PARSING", "XML parsing"); define("REQUIREMENTS", "Requirements"); define("_PHP_VERSION", "PHP version"); -define("RECOMMENDED_SETTINGS", "Recommended settings"); define("RECOMMENDED_EXTENSIONS", "Recommended extensions"); -define("SETTING_NAME", "Setting name"); define("RECOMMENDED", "Recommended"); define("CURRENT", "Current"); define("RECOMMENDED_EXTENSIONS_MSG", "These extensions are not required for normal use, but may be necessary to exploit @@ -56,8 +53,6 @@ define("DATABASE_CONFIG_TITLE", "Database configuration"); define("CONFIG_SAVE", "Configuration save"); define("CONFIG_SAVE_TITLE", "Saving your system configuration"); -define("TABLES_CREATION", "Tables creation"); -define("TABLES_CREATION_TITLE", "Database tables creation"); define("INITIAL_SETTINGS", "Initial settings"); define("INITIAL_SETTINGS_TITLE", "Please enter your initial settings"); define("DATA_INSERTION", "Data insertion"); @@ -66,9 +61,6 @@ define("WELCOME_TITLE", "Welcome to your XOOPS site"); // L0 -// Settings (labels and help text) -define("XOOPS_PATHS", "XOOPS Physical paths"); -define("XOOPS_URLS", "Web locations"); define("XOOPS_ROOT_PATH_LABEL", "XOOPS documents root physical path"); define("XOOPS_ROOT_PATH_HELP", "Physical path to the XOOPS documents (served) directory WITHOUT trailing slash"); @@ -120,29 +112,12 @@ define("XOOPS_PATH_FOUND", "Path found."); -define("READY_CREATE_TABLES", "No XOOPS tables were detected.<br />The installer is now ready to create the XOOPS system tables.<br />Press <em>next</em> to proceed."); -define("XOOPS_TABLES_FOUND", "The XOOPS system tables already exists in your database.<br />Press <em>next</em> to go to the next step."); // L131 -define("XOOPS_TABLES_CREATED", "XOOPS system tables have been created.<br />Press <em>next</em> to go to the next step."); -define("READY_INSERT_DATA", "The installer is now ready to insert initial data into your database."); -define("READY_SAVE_MAINFILE", "The installer is now ready to save the specified settings to <em>mainfile.php</em>.<br />Press <em>next</em> to proceed."); define("SAVED_MAINFILE", "Saved settings in mainfile.php"); define("SAVED_MAINFILE_MSG", "The installer has saved the specified settings to <em>mainfile.php</em> and <em>secure.php</em>. Press <em>next</em> to go to the next step."); define("DATA_ALREADY_INSERTED", "XOOPS data found in database.<br />Press <em>next</em> to go to the next step."); define("DATA_INSERTED", "Initial data have been inserted into database.<br />Press <em>next</em> to go to the next step."); -// %s is database name -define("DATABASE_CREATED", "Database %s created!"); // L43 -// %s is table name -define("TABLE_NOT_CREATED", "Unable to create table %s"); // L118 -define("TABLE_CREATED", "Table %s created."); // L45 -define("ROWS_INSERTED", "%d entries inserted to table %s."); // L119 -define("ROWS_FAILED", "Failed inserting %d entries to table %s."); // L120 -define("TABLE_ALTERED", "Table %s updated."); // L133 -define("TABLE_NOT_ALTERED", "Failed updating table %s."); // L134 -define("TABLE_DROPPED", "Table %s dropped."); // L163 -define("TABLE_NOT_DROPPED", "Failed deleting table %s."); // L164 - // Error messages define("ERR_COULD_NOT_ACCESS", "Could not access the specified folder. Please verify that it exists and is readable by the server."); define("ERR_NO_XOOPS_FOUND", "No XOOPS installation could be found in the specified folder."); @@ -164,13 +139,14 @@ define("_INSTALL_CHARSET", "UTF-8"); +define("_LANGCODE", "en-US"); define("SUPPORT", "Supports"); define("LOGIN", "Authentication"); -define("LOGIN_TITLE", "Authentication"); -define("USER_LOGIN", "Administrator Login"); -define("USERNAME", "Username :"); +//define("LOGIN_TITLE", "Authentication"); +//define("USER_LOGIN", "Administrator Login"); +//define("USERNAME", "Username :"); define("PASSWORD", "Password :"); define("ICONV_CONVERSION", "Character set conversion"); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/support.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/language/english/support.php 2013-02-07 15:10:40 UTC (rev 11006) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/locale/en_US/support.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -7,7 +7,7 @@ $supports = array(); // Support site for English -$supports["english"] = array( +$supports["en_US"] = array( "url" => "http://www.xoops.org/", "title" => "English support", ); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_configsite.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_configsite.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_configsite.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -30,6 +30,7 @@ $xoops = Xoops::getInstance(); /* @var $wizard XoopsInstallWizard */ $wizard = $_SESSION['wizard']; +$xoops->loadLocale('system'); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $config_handler = $xoops->getHandlerConfig(); @@ -44,10 +45,6 @@ $wizard->redirectToPage('+1'); } -$xoops->loadLanguage('admin', 'system', $wizard->language); -$xoops->loadLanguage('admin/preferences', 'system', $wizard->language); -$xoops->loadLocale('system', $wizard->language);//change this to locale - $config_handler = $xoops->getHandlerConfig(); $criteria = new CriteriaCompo(); $criteria->add(new Criteria('conf_modid', 1)); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_extensioninstaller.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_extensioninstaller.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_extensioninstaller.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -26,21 +26,14 @@ /* @var $wizard XoopsInstallWizard */ $wizard = $_SESSION['wizard']; - -$xoops->loadLanguage('admin', 'system', $wizard->language); -$xoops->loadLanguage('global', '', $wizard->language); -$xoops->loadLocale('xoops', $wizard->language);//this must be changed to receive a locale -$xoops->loadLanguage('admin/extension', 'system', $wizard->language); -$xoops->loadLocale(); - $pageHasForm = true; if ($_SERVER['REQUEST_METHOD'] == 'POST') { + $xoops->loadLocale('system'); include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php"; $system = System::getInstance(); - $system->loadLanguage('modulesadmin','system'); $system_module = new SystemModule(); @@ -56,8 +49,10 @@ if (count($msgs) > 0) { $content = "<div class='x2-note successMsg'>" . INSTALLED_EXTENSION . "</div><ul class='log'>"; foreach ($msgs as $msg) { - $tempvar = $msg->modinfo['name']; - $content .= "<dt>{$tempvar}</dt>"; + if ($msg instanceof XoopsModule) { + $tempvar = $msg->modinfo['name']; + $content .= "<dt>{$tempvar}</dt>"; + } } $content .= "</ul>"; } else { @@ -67,15 +62,15 @@ //Set active modules in cache folder $xoops->setActiveModules(); } else { - if (!$xoops->getConfig('language')) { - $xoops->setConfig('language', $_COOKIE['xo_install_lang']); + if (!$xoops->getConfig('locale')) { + $xoops->setConfig('locale', $_COOKIE['xo_install_lang']); } + $xoops->loadLocale('system'); include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; include_once XOOPS_ROOT_PATH . "/modules/system/class/extension.php"; include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php"; $system = System::getInstance(); - $system->loadLanguage('modulesadmin','system'); // Get installed modules $system_module = new SystemExtension(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_langselect.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_langselect.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_langselect.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -30,7 +30,7 @@ /* @var $wizard XoopsInstallWizard */ $wizard = $_SESSION['wizard']; -setcookie('xo_install_lang', 'english', null, null, null); +setcookie('xo_install_lang', 'en_US', null, null, null); if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_REQUEST['lang'])) { $lang = $_REQUEST['lang']; setcookie('xo_install_lang', $lang, null, null, null); @@ -45,7 +45,7 @@ //$title = LANGUAGE_SELECTION; $content = '<div class="languages">'; -$languages = getDirList("./language/"); +$languages = getDirList("./locale/"); foreach ($languages as $lang) { $sel = ($lang == $wizard->language) ? ' checked="checked"' : ''; $content .= "<label><input type=\"radio\" name=\"lang\" value=\"{$lang}\"{$sel} />{$lang}</label>\n"; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_moduleinstaller.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -31,21 +31,15 @@ /* @var $wizard XoopsInstallWizard */ $wizard = $_SESSION['wizard']; - -$xoops->loadLanguage('admin', 'system', $wizard->language); -$xoops->loadLanguage('global', '', $wizard->language); -$xoops->loadLocale('xoops', $wizard->language);//this must be changed to receive a locale -$xoops->loadLanguage('admin/modulesadmin', 'system', $wizard->language); - $pageHasForm = true; if ($_SERVER['REQUEST_METHOD'] == 'POST') { + $xoops->loadLocale('system'); include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php"; $system_module = new SystemModule(); $system = System::getInstance(); - $system->loadLanguage('modulesadmin','system'); $msgs = array(); foreach ($_REQUEST['modules'] as $dirname => $installmod) { @@ -70,16 +64,15 @@ //Set active modules in cache folder $xoops->setActiveModules(); } else { - if (!$xoops->getConfig('language')) { - $xoops->setConfig('language', $_COOKIE['xo_install_lang']); + if (!$xoops->getConfig('locale')) { + $xoops->setConfig('locale', $_COOKIE['xo_install_lang']); } + $xoops->loadLocale('system'); include_once XOOPS_ROOT_PATH . "/modules/system/class/module.php"; include_once XOOPS_ROOT_PATH . "/modules/system/class/system.php"; - $system_module = new SystemModule(); $system = System::getInstance(); - $system->loadLanguage('modulesadmin','system'); // Get installed modules $system_module = new SystemModule(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_siteinit.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_siteinit.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_siteinit.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -31,22 +31,16 @@ $xoops->setActiveModules(); $root = dirname(dirname(__FILE__)); $language = $wizard->language; -$xoops->loadLocale('xoops', $language);//this must be changed to receive a locale +$xoops->setConfig('locale', $language); +$xoops->loadLocale(); +$xoops->loadLocale('system'); -// system modules -if (file_exists($file = $root . '/modules/system/language/' . $language . '/modinfo.php')) { - include $file; -} else { - include $root . '/modules/system/language/english/modinfo.php'; - $language = 'english'; -} // Install system module include_once $root . "/modules/system/class/module.php"; include_once $root . "/modules/system/class/system.php"; -$xoops->loadLanguage('admin', 'system'); + $system_module = new SystemModule(); $system = System::getInstance(); -$system->loadLanguage('modulesadmin', 'system'); $system_module->install('system', true); $pageHasForm = true; Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_tablesfill.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_tablesfill.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_tablesfill.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -35,7 +35,8 @@ $settings = $_SESSION['settings']; $language = $wizard->language; -$xoops->loadLocale('xoops', $language);//this must be changed to receive a locale +$xoops->setConfig('locale', $language); +$xoops->loadLocale(); $dbm = new XoopsDatabaseManager(); @@ -62,8 +63,6 @@ if ($process) { //$cm = 'dummy'; $wizard->loadLangFile('install2'); - $language = $wizard->language; - $xoops->loadLanguage('global', '', $language); $temp = md5($adminpass); $regdate = time(); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/install/page_theme.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -48,9 +48,9 @@ $wizard->redirectToPage('+1'); } -$xoops->loadLanguage('admin', 'system', $wizard->language); -$xoops->loadLanguage('admin/preferences', 'system', $wizard->language); +$xoops->loadLocale('system'); + $criteria = new CriteriaCompo(); $criteria->add(new Criteria('conf_modid', 1)); $criteria->add(new Criteria('conf_name', 'theme_set')); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/block.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -334,13 +334,7 @@ return false; } if (XoopsLoad::fileExists(XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file'))) { - if (XoopsLoad::fileExists($file = XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/language/' . $xoops->getConfig('language') . '/blocks.php')) { - include_once $file; - } else { - if (XoopsLoad::fileExists($file = XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/language/english/blocks.php')) { - include_once $file; - } - } + $xoops->loadLanguage('blocks', $this->getVar('dirname')); include_once XOOPS_ROOT_PATH . '/modules/' . $this->getVar('dirname') . '/blocks/' . $this->getVar('func_file'); $options = explode('|', $this->getVar('options')); $edit_form = $edit_func($options); Copied: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/_global.php (from rev 11006, XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php) =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/_global.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/_global.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -0,0 +1,193 @@ +<?php +// $Id$ +// _LANGCODE: en +// _CHARSET : UTF-8 +// Translator: XOOPS Translation Team +//define('_PLEASEWAIT','Please Wait'); +//define('_FETCHING','Loading...'); +//define('_TAKINGBACK','Taking you back to where you were....'); +//define('_LOGOUT','Logout'); +//define('_SUBJECT','Subject'); +//define('_MESSAGEICON','Message Icon'); +//define('_COMMENTS','Comments'); +//define('_POSTANON','Post Anonymously'); +//define('_DISABLESMILEY','Disable smiley'); +//define('_DISABLEHTML','Disable html'); +//define('_PREVIEW','Preview'); +//define('_GO','Go!'); +//define('_NESTED','Nested'); +//define('_NOCOMMENTS','No Comments'); +//define('_FLAT','Flat'); +//define('_THREADED','Threaded'); +//define('_OLDESTFIRST','Oldest First'); +//define('_NEWESTFIRST','Newest First'); +//define('_MORE','more...'); +//define('_MULTIPAGE','To have your article span multiple pages, insert the word <font color=red>[pagebreak]</font> (with brackets) in the article.'); +//define('_IFNOTRELOAD','If the page does not automatically reload, please click <a href=\'%s\'>here</a>'); +// Error messages issued by XoopsObject::cleanVars() +//define('_XOBJ_ERR_REQUIRED','%s is required'); +//define('_XOBJ_ERR_SHORTERTHAN','%s must be shorter than %d characters.'); +// %%%%%% File Name themeuserpost.php %%%%% +//define('_PROFILE','Profile'); +//define('_POSTEDBY','Posted by'); +//define('_VISITWEBSITE','Visit Website'); +//define('_SENDPMTO','Send Private Message to %s'); +//define('_SENDEMAILTO','Send Email to %s'); +//define('_ADD','Add'); +//define('_REPLY','Reply'); +//define('_DATE','Date'); // Posted date +// %%%%%% File Name admin_functions.php %%%%% +//define('_MAIN','Main'); +//define('_MANUAL','Manual'); +//define('_INFO','Info'); +//define('_CPHOME','Control Panel Home'); +//define('_YOURHOME','Home Page'); +// %%%%%% File Name misc.php (who's-online popup) %%%%% +//define('_WHOSONLINE','Who\'s Online'); +//define('_GUESTS','Guests'); +//define('_MEMBERS','Members'); +//define('_ONLINEPHRASE','<strong>%s</strong> user(s) are online'); +//define('_ONLINEPHRASEX','<strong>%s</strong> user(s) are browsing <strong>%s</strong>'); +//define('_CLOSE','Close'); // Close window +// %%%%%% File Name module.textsanitizer.php %%%%% +//define('_QUOTEC','Quote:'); +// %%%%%% File Name admin.php %%%%% +//define('_NOPERM','Sorry, you don\'t have the permission to access this area.'); +// %%%%% Common Phrases %%%%% +//define('_NO','No'); +//define('_YES','Yes'); +//define('_EDIT','Edit'); +//define('_DELETE','Delete'); +//define('_SUBMIT','Submit'); +//define('_MODULENOEXIST','Selected module does not exist!'); +//define('_ALIGN','Align'); +//define('_LEFT','Left'); +//define('_CENTER','Center'); +//define('_RIGHT','Right'); +//define('_FORM_ENTER','Please enter %s'); +//define('_MUSTWABLE','File %s must be writable by the server!'); // %s represents file name +// Module info +//define('_PREFERENCES','Preferences'); +//define('_VERSION','Version'); +//define('_DESCRIPTION','Description'); +//define('_AUTHOR','Author'); +//define('_CREDITS','Credits'); +//define('_LICENCE','Licence'); +//define('_ERRORS','Errors'); +//define('_NONE','None'); +//define('_ON','on'); +//define('_READS','reads'); +//define('_WELCOMETO','Welcome to %s'); +//define('_SEARCH','Search'); +//define('_ALL','All'); +//define('_TITLE','Title'); +//define('_OPTIONS','Options'); +//define('_QUOTE','Quote'); +//define('_LIST','List'); +//define('_LOGIN','User Login'); +//define('_USERNAME','Username: '); +//define('_PASSWORD','Password: '); +//define('_SELECT','Select'); +//define('_IMAGE','Image'); +//define('_SEND','Send'); +//define('_CANCEL','Cancel'); +//define('_ASCENDING','Ascending order'); +//define('_DESCENDING','Descending order'); +//define('_BACK','Back'); +//define('_NOTITLE','No title'); +//define('_NOCACHE','No Cache'); +//define('_CLONE','Clone'); +// %%%%% For xoopsform files %%%%% +//define('_STARTSWITH','Starts with'); +//define('_ENDSWITH','Ends with'); +//define('_MATCHES','Matches'); +//define('_CONTAINS','Contains'); +//define('_REQUIRED','Required'); +// %%%%%% File Name commentform.php %%%%% +//define('_REGISTER','Register'); +// %%%%%% File Name xoopscodes.php %%%%% +//define('_SIZE','SIZE'); // font size +//define('_FONT','FONT'); // font family +//define('_COLOR','COLOR'); // font color +//define('_EXAMPLE','SAMPLE'); +//define('_ENTERURL','Enter the URL of the link you want to add:'); +//define('_ENTERWEBTITLE','Enter the web site title:'); +//define('_ENTERIMGURL','Enter the URL of the image you want to add.'); +//define('_ENTERIMGPOS','Now, enter the position of the image.'); +//define('_IMGPOSRORL','\'R\' or \'r\' for right, \'L\' or \'l\' for left, or leave it blank.'); +//define('_ERRORIMGPOS','ERROR! Enter the position of the image.'); +//define('_ENTEREMAIL','Enter the email address you want to add.'); +//define('_ENTERCODE','Enter the codes that you want to add.'); +//define('_ENTERQUOTE','Enter the text that you want to be quoted.'); +//define('_ENTERTEXTBOX','Please input text into the textbox.'); +//define('_ALLOWEDCHAR','Allowed max chars length: '); +//define('_CURRCHAR','Current chars length: '); +//define('_PLZCOMPLETE','Please complete the subject and message fields.'); +//define('_MESSAGETOOLONG','Your message is too long.'); +/** +* xoops smilie +*/ +//define('_AM_ADDSMILE',' Add a new smilie'); +//define('_AM_SMILECODE','Code'); +//define('_AM_SMILEEMOTION','Description'); +//define('_AM_DISPLAYF','Display in the form'); +// %%%%% TIME FORMAT SETTINGS %%%%% +//define('_SECOND','1 second'); +//define('_SECONDS','%s seconds'); +//define('_MINUTE','1 minute'); +//define('_MINUTES','%s minutes'); +//define('_HOUR','1 hour'); +//define('_HOURS','%s hours'); +//define('_DAY','1 day'); +//define('_DAYS','%s days'); +//define('_WEEK','1 week'); +//define('_MONTH','1 month'); +//define('_DATESTRING','Y/n/j G:i:s'); +//define('_MEDIUMDATESTRING','Y/n/j G:i'); +//define('_SHORTDATESTRING','Y/n/j'); +/** +* The following characters are recognized in the format string: +* a - 'am' or 'pm' +* A - 'AM' or 'PM' +* d - day of the month, 2 digits with leading zeros; i.e. '01' to '31' +* D - day of the week, textual, 3 letters; i.e. 'Fri' +* F - month, textual, long; i.e. 'January' +* h - hour, 12-hour format; i.e. '01' to '12' +* H - hour, 24-hour format; i.e. '00' to '23' +* g - hour, 12-hour format without leading zeros; i.e. '1' to '12' +* G - hour, 24-hour format without leading zeros; i.e. '0' to '23' +* i - minutes; i.e. '00' to '59' +* j - day of the month without leading zeros; i.e. '1' to '31' +* l (lowercase 'L') - day of the week, textual, long; i.e. 'Friday' +* L - boolean for whether it is a leap year; i.e. '0' or '1' +* m - month; i.e. '01' to '12' +* n - month without leading zeros; i.e. '1' to '12' +* M - month, textual, 3 letters; i.e. 'Jan' +* s - seconds; i.e. '00' to '59' +* S - English ordinal suffix, textual, 2 characters; i.e. 'th','nd' +* t - number of days in the given month; i.e. '28' to '31' +* T - Timezone setting of this machine; i.e. 'MDT' +* U - seconds since the epoch +* w - day of the week, numeric, i.e. '0' (Sunday) to '6' (Saturday) +* Y - year, 4 digits; i.e. '1999' +* y - year, 2 digits; i.e. '99' +* z - day of the year; i.e. '0' to '365' +* Z - timezone offset in seconds (i.e. '-43200' to '43200') +*/ +// %%%%% LANGUAGE SPECIFIC SETTINGS %%%%% +//define('_CHARSET','UTF-8'); +//define('_LANGCODE','en_US'); +// change 0 to 1 if this language is a multi-bytes language +//define('XOOPS_USE_MULTIBYTES','0'); +/** +* Additions to 2.4.0 +**/ +//define('_RESET','Reset'); +//define('_RE','Re:'); + +/** +* Additions to 2.6.0 +**/ +//define('_FORM_VALID_URL','Starting with http or https'); +//define('_FORM_VALID_MAIL','Enter a valid email address'); +?> \ No newline at end of file Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php 2013-02-08 23:23:51 UTC (rev 11011) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/language/english/global.php 2013-02-10 00:51:04 UTC (rev 11012) @@ -1,193 +0,0 @@ -<?php -// $Id$ -// _LANGCODE: en -// _CHARSET : UTF-8 -// Translator: XOOPS Translation Team -//define('_PLEASEWAIT','Please Wait'); -//define('_FETCHING','Loading...'); -//define('_TAKINGBACK','Taking you back to where you were....'); -//define('_LOGOUT','Logout'); -//define('_SUBJECT','Subject'); -//define('_MESSAGEICON','Message Icon'); -//define('_COMMENTS','Comments'); -//define('_POSTANON','Post Anonymously'); -//define('_DISABLESMILEY','Disable smiley'); -//define('_DISABLEHTML','Disable html'); -//define('_PREVIEW','Preview'); -//define('_GO','Go!'); -//define('_NESTED','Nested'); -//define('_NOCOMMENTS','No Comments'); -//define('_FLAT','Flat'); -//define('_THREADED','Threaded'); -//define('_OLDESTFIRST','Oldest First'); -//define('_NEWESTFIRST','Newest First'); -//define('_MORE','more...'); -//define('_MULTIPAGE','To have your article span multiple pages, insert the word <font color=red>[pagebreak]</font> (with brackets) in the article.'); -//define('_IFNOTRELOAD','If the page does not automatically reload, please click <a href=\'%s\'>here</a>'); -// Error messages issued by XoopsObject::cleanVars() -//define('_XOBJ_ERR_REQUIRED','%s is required'); -//define('_XOBJ_ERR_SHORTERTHAN','%s must be shorter than %d characters.'); -// %%%%%% File Name themeuserpost.php %%%%% -//define('_PROFILE','Profile'); -//define('_POSTEDBY','Posted by'); -//define('_VISITWEBSITE','Visit Website'); -//define('_SENDPMTO','Send Private Message to %s'); -//define('_SENDEMAILTO','Send Email to %s'); -//define('_ADD','Add'); -//define('_REPLY','Reply'); -//define('_DATE','Date'); // Posted date -// %%%%%% File Name admin_functions.php %%%%% -//define('_MAIN','Main'); -//define('_MANUAL','Manual'); -//define('_INFO','Info'); -//define('_CPHOME','Control Panel Home'); -//define('_YOURHOME','Home Page'); -// %%%%%% File Name misc.php (who's-online popup) %%%%% -//define('_WHOSONLINE','Who\'s Online'); -//define('_GUESTS','Guests'); -//define('_MEMBERS','Members'); -//define('_ONLINEPHRASE','<strong>%s</strong> user(s) are online'); -//define('_ONLINEPHRASEX','<strong>%s</strong> user(s) are browsing <strong>%s</strong>'); -//define('_CLOSE','Close'); // Close window -// %%%%%% File Name module.textsanitizer.php %%%%% -//define('_QUOTEC','Quote:'); -// %%%%%% File Name admin.php %%%%% -//define('_NOPERM','Sorry, you don\'t have the permission to access this area.'); -// %%%%% Common Phrases %%%%% -//define('_NO','No'); -//define('_YES','Yes'); -//define('_EDIT','Edit'); -//define('_DELETE','Delete'); -//define('_SUBMIT','Submit'); -//define('_MODULENOEXIST','Selected module does not exist!'); -//define('_ALIGN','Align'); -//define('_LEFT','Left'); -//define('_CENTER','Center'); -//define('_RIGHT','Right'); -//define('_FORM_ENTER','Please enter %s'); -//define('_MUSTWABLE','File %s must be writable by the server!'); // %s represents file name -// Module info -//define('_PREFERENCES','Preferences'); -//define('_VERSION','Version'); -//define('_DESCRIPTION','Description'); -//define('_AUTHOR','Author'); -//define('_CREDITS','Credits'); -//define('_LICENCE','Licence'); -//define('_ERRORS','Errors'); -//define('_NONE','None'); -//define('_ON','on'); -//define('_READS','reads'); -//define('_WELCOMETO','Welcome to %s'); -//define('_SEARCH','Search'); -//define('_ALL','All'); -//define('_TITLE','Title'); -//define('_OPTIONS','Options'); -//define('_QUOTE','Quote'); -//define('_LIST','List'); -//define('_LOGIN','User Login'); -//define('_USERNAME','Username: '); -//define('_PASSWORD','Password: '); -//define('_SELECT','Select'); -//define('_IMAGE','Image'); -//define('_SEND','Send'); -//define('_CANCEL','Cancel'); -//define('_ASCENDING','Ascending order'); -//define('_DESCENDING','Descending order'); -//define('_BACK','Back'); -//define('_NOTITLE','No title'); -//define('_NOCACHE','No Cache'); -//define('_CLONE','Clone'); -// %%%%% For xoopsform files %%%%% -//define('_STARTSWITH','Starts with'); -//define('_ENDSWITH','Ends with'); -//define('_MATCHES','Matches'); -//define('_CONTAINS','Contains'); -//define('_REQUIRED','Required'); -// %%%%%% File Name commentform.... [truncated message content] |