<!DOCTYPE html>\r
-<html dir="{lang}wcf.global.pageDirection{/lang}" lang="{@LANGUAGE_CODE}">\r
+<html dir="{@$__wcf->getLanguage()->getPageDirection()}" lang="{@$__wcf->getLanguage()->getFixedLanguageCode()}">\r
<head>\r
<meta charset="utf-8" />\r
<title>{if $pageTitle|isset}{@$pageTitle}{else}{lang}wcf.global.pageTitle{/lang}{/if} - {lang}wcf.acp{/lang}</title>\r
\r
{*\r
<style type="text/css">\r
- @import url("{@RELATIVE_WCF_DIR}acp/style/style-{@PAGE_DIRECTION}.css");\r
+ @import url("{@RELATIVE_WCF_DIR}acp/style/style-{@$__wcf->getLanguage()->getPageDirection()}.css");\r
</style>\r
\r
<!--[if IE 8]>\r
<style type="text/css">\r
- @import url("{@RELATIVE_WCF_DIR}style/extra/ie8-fix{if PAGE_DIRECTION == 'rtl'}-rtl{/if}.css");\r
+ @import url("{@RELATIVE_WCF_DIR}style/extra/ie8-fix{if $__wcf->getLanguage()->getPageDirection() == 'rtl'}-rtl{/if}.css");\r
</style>\r
<![endif]-->\r
*}\r
<?xml version="1.0" encoding="UTF-8"?>\r
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{lang}wcf.global.pageDirection{/lang}" xml:lang="{@LANGUAGE_CODE}">\r
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{@$__wcf->getLanguage()->getPageDirection()}" xml:lang="{@$__wcf->getLanguage()->getFixedLanguageCode()}">\r
<head>\r
<title>{@$pageTitle} - {lang}wcf.global.pageTitle{/lang}</title>\r
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}js/AjaxRequest.class.js"></script>\r
<script type="text/javascript" src="{@RELATIVE_WCF_DIR}acp/js/default.js"></script>\r
<style type="text/css">\r
- @import url("{@RELATIVE_WCF_DIR}acp/style/extra/setupStyle{if PAGE_DIRECTION == 'rtl'}-rtl{/if}.css");\r
+ @import url("{@RELATIVE_WCF_DIR}acp/style/extra/setupStyle{if $__wcf->getLanguage()->getPageDirection() == 'rtl'}-rtl{/if}.css");\r
</style>\r
\r
<!--[if lt IE 7]>\r
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{lang}wcf.global.pageDirection{/lang}" xml:lang="{@LANGUAGE_CODE}">\r
- <head>\r
- <title></title>\r
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
- <link href="{@RELATIVE_WCF_DIR}acp/style/extra/setupWindowStyle{if PAGE_DIRECTION == 'rtl'}-rtl{/if}.css" rel="stylesheet" type="text/css" />\r
- <script type="text/javascript">\r
- //<![CDATA[\r
- function changeHeight() {\r
- if (parent.document.getElementById('iframe').style.visibility != 'hidden') {\r
- parent.document.getElementById('iframe').style.height = document.getElementById('content').offsetHeight + 4 + 'px';\r
- }\r
- }\r
- //]]>\r
- </script>\r
- </head>\r
-<body>\r
-<div id="content" class="page" style="padding: 2px 4px">\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{@$__wcf->getLanguage()->getPageDirection()}" xml:lang="{@$__wcf->getLanguage()->getFixedLanguageCode()}">
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link href="{@RELATIVE_WCF_DIR}acp/style/extra/setupWindowStyle{if $__wcf->getLanguage()->getPageDirection() == 'rtl'}-rtl{/if}.css" rel="stylesheet" type="text/css" />
+ <script type="text/javascript">
+ //<![CDATA[
+ function changeHeight() {
+ if (parent.document.getElementById('iframe').style.visibility != 'hidden') {
+ parent.document.getElementById('iframe').style.height = document.getElementById('content').offsetHeight + 4 + 'px';
+ }
+ }
+ //]]>
+ </script>
+ </head>
+<body>
+<div id="content" class="page" style="padding: 2px 4px">
-<?php\r
-namespace wcf\data\language;\r
-use wcf\data\DatabaseObject;\r
-use wcf\system\WCF;\r
-use wcf\system\language\LanguageFactory;\r
-\r
-/**\r
- * Represents a language.\r
- * \r
- * @author Alexander Ebert\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage data.language\r
- * @category Community Framework\r
- */\r
-class Language extends DatabaseObject {\r
- /**\r
- * @see DatabaseObject::$databaseTableName\r
- */\r
- protected static $databaseTableName = 'language';\r
- \r
- /**\r
- * @see DatabaseObject::$databaseTableIndexName\r
- */\r
- protected static $databaseTableIndexName = 'languageID';\r
- \r
- /**\r
- * list of language items\r
- * \r
- * @var array\r
- */\r
- protected $items = array();\r
- \r
- /**\r
- * list of dynamic language items\r
- * \r
- * @param array\r
- */\r
- protected $dynamicItems = array();\r
- \r
- /**\r
- * instance of LanguageEditor\r
- * \r
- * @var LanguageEditor\r
- */\r
- private $editor = null;\r
- \r
- /**\r
- * Active package id\r
- * \r
- * @var integer\r
- */\r
- public $packageID = PACKAGE_ID;\r
- \r
- /**\r
- * Returns a single language variable.\r
- * \r
- * @param string $item\r
- * @return string\r
- */\r
- public function get($item) {\r
- if (!isset($this->items[$item])) {\r
- // load category file\r
- $explodedItem = explode('.', $item);\r
- if (count($explodedItem) < 2) {\r
- return $item;\r
- }\r
- \r
- if (count($explodedItem) < 4 || !$this->loadCategory($explodedItem[0].'.'.$explodedItem[1].'.'.$explodedItem[2].'.'.$explodedItem[3])) {\r
- if (count($explodedItem) < 3 || !$this->loadCategory($explodedItem[0].'.'.$explodedItem[1].'.'.$explodedItem[2])) {\r
- $this->loadCategory($explodedItem[0].'.'.$explodedItem[1]);\r
- }\r
- }\r
- }\r
- \r
- // return language variable\r
- if (isset($this->items[$item])) {\r
- return $this->items[$item];\r
- }\r
- \r
- // return plain variable\r
- return $item;\r
- }\r
- \r
- /**\r
- * Executes template scripting in a language variable.\r
- *\r
- * @param string $item\r
- * @param array $variables \r
- * @return string result\r
- */\r
- public function getDynamicVariable($item, array $variables = array()) {\r
- $staticItem = $this->get($item);\r
- \r
- if (isset($this->dynamicItems[$this->languageID][$item])) {\r
- if (count($variables)) WCF::getTPL()->assign($variables);\r
- return WCF::getTPL()->fetchString($this->dynamicItems[$this->languageID][$item]);\r
- }\r
- \r
- return $staticItem;\r
- }\r
- \r
- /**\r
- * Loads category files.\r
- *\r
- * @param string $category\r
- * @return boolean\r
- */\r
- protected function loadCategory($category) {\r
- if (!LanguageFactory::isValidCategory($category)) {\r
- return false;\r
- }\r
- \r
- // search language file\r
- $filename = WCF_DIR.'language/'.$this->packageID.'_'.$this->languageID.'_'.$category.'.php';\r
- if (!@file_exists($filename)) { \r
- if ($this->editor === null) {\r
- $this->editor = new LanguageEditor($this);\r
- }\r
- \r
- // rebuild language file\r
- $languageCategory = LanguageFactory::getCategory($category);\r
- $this->editor->updateCategory(array($languageCategory['languageCategoryID']), array($this->packageID));\r
- }\r
- \r
- // include language file\r
- @include_once($filename);\r
- return true;\r
- }\r
- \r
- /**\r
- * Returns true if given items includes template scripting.\r
- * \r
- * @param string $item\r
- * @return boolean\r
- */\r
- public function isDynamicItem($item) {\r
- if (isset($this->dynamicItems[$item])) {\r
- return true;\r
- }\r
- \r
- return false;\r
- }\r
+<?php
+namespace wcf\data\language;
+use wcf\data\DatabaseObject;
+use wcf\system\WCF;
+use wcf\system\language\LanguageFactory;
+
+/**
+ * Represents a language.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data.language
+ * @category Community Framework
+ */
+class Language extends DatabaseObject {
+ /**
+ * @see DatabaseObject::$databaseTableName
+ */
+ protected static $databaseTableName = 'language';
+
+ /**
+ * @see DatabaseObject::$databaseTableIndexName
+ */
+ protected static $databaseTableIndexName = 'languageID';
+
+ /**
+ * list of language items
+ *
+ * @var array
+ */
+ protected $items = array();
+
+ /**
+ * list of dynamic language items
+ *
+ * @param array
+ */
+ protected $dynamicItems = array();
+
+ /**
+ * instance of LanguageEditor
+ *
+ * @var LanguageEditor
+ */
+ private $editor = null;
+
+ /**
+ * Active package id
+ *
+ * @var integer
+ */
+ public $packageID = PACKAGE_ID;
+
+ /**
+ * Returns the fixed language code of this language.
+ *
+ * @return string
+ */
+ public function getFixedLanguageCode() {
+ return LanguageFactory::fixLanguageCode($this->languageCode);
+ }
+
+ /**
+ * Returns the page direction of this language.
+ *
+ * @return string
+ */
+ public function getPageDirection() {
+ return $this->get('wcf.global.pageDirection');
+ }
+
+ /**
+ * Returns a single language variable.
+ *
+ * @param string $item
+ * @return string
+ */
+ public function get($item) {
+ if (!isset($this->items[$item])) {
+ // load category file
+ $explodedItem = explode('.', $item);
+ if (count($explodedItem) < 2) {
+ return $item;
+ }
+
+ if (count($explodedItem) < 4 || !$this->loadCategory($explodedItem[0].'.'.$explodedItem[1].'.'.$explodedItem[2].'.'.$explodedItem[3])) {
+ if (count($explodedItem) < 3 || !$this->loadCategory($explodedItem[0].'.'.$explodedItem[1].'.'.$explodedItem[2])) {
+ $this->loadCategory($explodedItem[0].'.'.$explodedItem[1]);
+ }
+ }
+ }
+
+ // return language variable
+ if (isset($this->items[$item])) {
+ return $this->items[$item];
+ }
+
+ // return plain variable
+ return $item;
+ }
+
+ /**
+ * Executes template scripting in a language variable.
+ *
+ * @param string $item
+ * @param array $variables
+ * @return string result
+ */
+ public function getDynamicVariable($item, array $variables = array()) {
+ $staticItem = $this->get($item);
+
+ if (isset($this->dynamicItems[$this->languageID][$item])) {
+ if (count($variables)) WCF::getTPL()->assign($variables);
+ return WCF::getTPL()->fetchString($this->dynamicItems[$this->languageID][$item]);
+ }
+
+ return $staticItem;
+ }
+
+ /**
+ * Loads category files.
+ *
+ * @param string $category
+ * @return boolean
+ */
+ protected function loadCategory($category) {
+ if (!LanguageFactory::isValidCategory($category)) {
+ return false;
+ }
+
+ // search language file
+ $filename = WCF_DIR.'language/'.$this->packageID.'_'.$this->languageID.'_'.$category.'.php';
+ if (!@file_exists($filename)) {
+ if ($this->editor === null) {
+ $this->editor = new LanguageEditor($this);
+ }
+
+ // rebuild language file
+ $languageCategory = LanguageFactory::getCategory($category);
+ $this->editor->updateCategory(array($languageCategory['languageCategoryID']), array($this->packageID));
+ }
+
+ // include language file
+ @include_once($filename);
+ return true;
+ }
+
+ /**
+ * Returns true if given items includes template scripting.
+ *
+ * @param string $item
+ * @return boolean
+ */
+ public function isDynamicItem($item) {
+ if (isset($this->dynamicItems[$item])) {
+ return true;
+ }
+
+ return false;
+ }
}
-<?php\r
-namespace wcf\data\language;\r
-use wcf\system\exception\SystemException;\r
-use wcf\system\io\File;\r
-use wcf\system\language\LanguageFactory;\r
-use wcf\util\XML;\r
-\r
-/**\r
- * SetupLanguage is a modification of Language only for the setup process.\r
- *\r
- * @author Marcel Werk\r
- * @copyright 2001-2011 WoltLab GmbH\r
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>\r
- * @package com.woltlab.wcf\r
- * @subpackage data.language\r
- * @category Community Framework\r
- */\r
-class SetupLanguage extends Language {\r
- /**\r
- * @see DatabaseObject::__construct()\r
- */\r
- public function __construct($languageID, array $row, Language $language = null) {\r
- if ($row === null) {\r
- throw new SystemException('SetupLanguage accepts only an existing dataset.');\r
- }\r
- \r
- parent::__construct(null, $row, null);\r
- \r
- $this->defineConstants();\r
- }\r
- \r
- /**\r
- * @see Language::loadCategory()\r
- */\r
- protected function loadCategory($category) {\r
- return false;\r
- }\r
- \r
- /**\r
- * Loads the compiled language file.\r
- * Compiles the language file before if necessary.\r
- */\r
- public function loadLanguage() {\r
- $filename = TMP_DIR.'setup/lang/cache/'.$this->languageCode.'_wcf.setup.php';\r
- \r
- if (!file_exists($filename)) {\r
- $xml = new XML();\r
- $xml->load(TMP_DIR.'setup/lang/setup_'.$this->languageCode.'.xml');\r
- \r
- // get language items\r
- $categoriesToCache = array();\r
- $items = $xml->xpath()->query('/ns:language/ns:category/ns:item');\r
- foreach ($items as $item) {\r
- $categoriesToCache[] = array(\r
- 'name' => $item->getAttribute('name'),\r
- 'cdata' => $item->nodeValue\r
- );\r
- }\r
- \r
- // update language files here\r
- if (count($categoriesToCache) > 0) {\r
- $file = new File($filename);\r
- $file->write("<?php\n/**\n* WoltLab Community Framework\n* language: ".$this->languageCode."\n* encoding: UTF-8\n* category: WCF Setup\n* generated at ".gmdate("r")."\n* \n* DO NOT EDIT THIS FILE\n*/\n");\r
- foreach ($categoriesToCache as $value => $name) {\r
- $file->write("\$this->items['".$name['name']."'] = '".str_replace("'", "\'", $name['cdata'])."';\n");\r
- \r
- // compile dynamic language variables\r
- if (strpos($name['cdata'], '{') !== false) {\r
- $file->write("\$this->dynamicItems['".$name['name']."'] = '".str_replace("'", "\'", LanguageFactory::getScriptingCompiler()->compileString($name['name'], $name['cdata']))."';\n");\r
- }\r
- }\r
- \r
- $file->write("?>");\r
- $file->close();\r
- }\r
- }\r
-\r
- include_once($filename);\r
- $this->setLocale();\r
- }\r
- \r
- /**\r
- * Defines all global constants.\r
- */\r
- private function defineConstants() {\r
- if (!defined('LANGUAGE_CODE')) {\r
- define('LANGUAGE_CODE', LanguageFactory::fixLanguageCode($this->languageCode));\r
- mb_internal_encoding('UTF-8');\r
- if (function_exists('mb_regex_encoding')) mb_regex_encoding('UTF-8');\r
- mb_language('uni');\r
- }\r
- }\r
- \r
- /**\r
- * Sets the local language.\r
- */\r
- private function setLocale() {\r
- // set locale for\r
- // string comparison\r
- // character classification and conversion\r
- // date and time formatting\r
- if (!defined('PAGE_DIRECTION')) define('PAGE_DIRECTION', $this->get('wcf.global.pageDirection'));\r
- setlocale(LC_COLLATE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win'));\r
- setlocale(LC_CTYPE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win'));\r
- }\r
+<?php
+namespace wcf\data\language;
+use wcf\system\exception\SystemException;
+use wcf\system\io\File;
+use wcf\system\language\LanguageFactory;
+use wcf\util\XML;
+
+/**
+ * SetupLanguage is a modification of Language only for the setup process.
+ *
+ * @author Marcel Werk
+ * @copyright 2001-2011 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package com.woltlab.wcf
+ * @subpackage data.language
+ * @category Community Framework
+ */
+class SetupLanguage extends Language {
+ /**
+ * @see DatabaseObject::__construct()
+ */
+ public function __construct($languageID, array $row, Language $language = null) {
+ if ($row === null) {
+ throw new SystemException('SetupLanguage accepts only an existing dataset.');
+ }
+
+ parent::__construct(null, $row, null);
+ }
+
+ /**
+ * @see Language::loadCategory()
+ */
+ protected function loadCategory($category) {
+ return false;
+ }
+
+ /**
+ * Loads the compiled language file.
+ * Compiles the language file before if necessary.
+ */
+ public function loadLanguage() {
+ $filename = TMP_DIR.'setup/lang/cache/'.$this->languageCode.'_wcf.setup.php';
+
+ if (!file_exists($filename)) {
+ $xml = new XML();
+ $xml->load(TMP_DIR.'setup/lang/setup_'.$this->languageCode.'.xml');
+
+ // get language items
+ $categoriesToCache = array();
+ $items = $xml->xpath()->query('/ns:language/ns:category/ns:item');
+ foreach ($items as $item) {
+ $categoriesToCache[] = array(
+ 'name' => $item->getAttribute('name'),
+ 'cdata' => $item->nodeValue
+ );
+ }
+
+ // update language files here
+ if (count($categoriesToCache) > 0) {
+ $file = new File($filename);
+ $file->write("<?php\n/**\n* WoltLab Community Framework\n* language: ".$this->languageCode."\n* encoding: UTF-8\n* category: WCF Setup\n* generated at ".gmdate("r")."\n* \n* DO NOT EDIT THIS FILE\n*/\n");
+ foreach ($categoriesToCache as $value => $name) {
+ $file->write("\$this->items['".$name['name']."'] = '".str_replace("'", "\'", $name['cdata'])."';\n");
+
+ // compile dynamic language variables
+ if (strpos($name['cdata'], '{') !== false) {
+ $file->write("\$this->dynamicItems['".$name['name']."'] = '".str_replace("'", "\'", LanguageFactory::getScriptingCompiler()->compileString($name['name'], $name['cdata']))."';\n");
+ }
+ }
+
+ $file->write("?>");
+ $file->close();
+ }
+ }
+
+ include_once($filename);
+ $this->setLocale();
+ }
+
+ /**
+ * Sets the local language.
+ */
+ private function setLocale() {
+ // set locale for
+ // string comparison
+ // character classification and conversion
+ // date and time formatting
+ setlocale(LC_COLLATE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win'));
+ setlocale(LC_CTYPE, $this->get('wcf.global.locale.unix').'.UTF-8', $this->get('wcf.global.locale.unix'), $this->get('wcf.global.locale.win'));
+ }
}
self::getSession()->setLanguageID(intval($_GET['l']));\r
}\r
\r
+ // set mb settings\r
+ mb_internal_encoding('UTF-8');\r
+ if (function_exists('mb_regex_encoding')) mb_regex_encoding('UTF-8');\r
+ mb_language('uni');\r
+ \r
+ // get language\r
self::$languageObj = LanguageFactory::getLanguage(self::getSession()->getLanguageID());\r
}\r
\r
* @param integer $languageID\r
*/\r
public static final function setLanguage($languageID) {\r
- self::$languageObj = new Language($languageID);\r
+ self::$languageObj = LanguageFactory::getLanguage($languageID);\r
+ self::getTPL()->setLanguageID(self::getLanguage()->languageID);\r
}\r
\r
/**\r
use wcf\system\cache\CacheHandler;\r
use wcf\system\database\util\SQLParser;\r
use wcf\system\exception\SystemException;\r
-use wcf\system\exception\UserInputException;\r
use wcf\system\io\File;\r
use wcf\system\io\Tar;\r
use wcf\system\language\LanguageFactory;\r
* Initialises the language engine.\r
*/\r
protected function initLanguage() {\r
+ // set mb settings\r
+ mb_internal_encoding('UTF-8');\r
+ if (function_exists('mb_regex_encoding')) mb_regex_encoding('UTF-8');\r
+ mb_language('uni');\r
+ \r
+ // init setup language\r
self::$languageObj = new SetupLanguage(null, array(\r
'languageCode' => self::$selectedLanguageCode\r
));\r
self::getTPL()->addTemplatePath(PACKAGE_ID, TMP_DIR);\r
self::getTPL()->registerPrefilter(array('lang'));\r
self::getTPL()->assign(array(\r
+ '__wcf' => $this,\r
'tmpFilePrefix' => TMP_FILE_PREFIX,\r
'languageCode' => self::$selectedLanguageCode,\r
'selectedLanguages' => self::$selectedLanguages,\r
WCF::getTPL()->display('stepInstallPackages');\r
\r
// delete tmp files\r
- $it = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator(TMP_DIR));\r
+ $directory = TMP_DIR.TMP_FILE_PREFIX.'/';\r
+ $it = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory));\r
while ($it->valid()) {\r
// delete all files except directories and packages (required for post-wcfsetup installation)\r
if (!$it->isDot() && !$it->isDir() && !preg_match('~\.tar(\.gz)?$~', $it->getSubPathName())) {\r
// assign package name\r
WCF::getTPL()->assign(array('setupPackageName' => self::$setupPackageName));\r
}\r
-}
+}\r
}
self::$languages[$language->languageID] = $language;
- self::defineConstants($languageID);
+ self::setLocale($languageID);
}
return self::$languages[$languageID];
CacheHandler::getInstance()->clear(WCF_DIR.'cache/', 'cache.languages.php');
}
- /**
- * Defines all global constants once first language is being initialized.
- *
- * @param integer $languageID
- */
- private static function defineConstants($languageID) {
- if (!defined('LANGUAGE_CODE')) {
- define('LANGUAGE_CODE', self::fixLanguageCode(self::$languages[$languageID]->languageCode));
- mb_internal_encoding('UTF-8');
- if (function_exists('mb_regex_encoding')) mb_regex_encoding('UTF-8');
- mb_language('uni');
- }
-
- self::setLocale($languageID);
- }
-
/**
* Sets the local language.
* Recall this function after language changed.
// string comparison
// character classification and conversion
// date and time formatting
- if (!defined('PAGE_DIRECTION')) define('PAGE_DIRECTION', self::$languages[$languageID]->get('wcf.global.pageDirection'));
setlocale(LC_COLLATE, self::$languages[$languageID]->get('wcf.global.locale.unix').'.UTF-8', self::$languages[$languageID]->get('wcf.global.locale.unix'), self::$languages[$languageID]->get('wcf.global.locale.win'));
setlocale(LC_CTYPE, self::$languages[$languageID]->get('wcf.global.locale.unix').'.UTF-8', self::$languages[$languageID]->get('wcf.global.locale.unix'), self::$languages[$languageID]->get('wcf.global.locale.win'));
}
* @param string $key
*/
protected function getLocalizedInformation($key) {
- if (isset($this->packageInfo[$key][LANGUAGE_CODE])) {
- $this->packageInfo[$key] = $this->packageInfo[$key][LANGUAGE_CODE];
+ if (isset($this->packageInfo[$key][WCF::getLanguage()->getFixedLanguageCode()])) {
+ $this->packageInfo[$key] = $this->packageInfo[$key][WCF::getLanguage()->getFixedLanguageCode()];
}
else if (isset($this->packageInfo[$key]['default'])) {
$this->packageInfo[$key] = $this->packageInfo[$key]['default'];
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\r
-<html xmlns="http://www.w3.org/1999/xhtml" dir="{lang}wcf.global.pageDirection{/lang}" xml:lang="{@LANGUAGE_CODE}">\r
- <head>\r
- <title>{lang}wcf.global.progressBar{/lang} - {lang}wcf.global.pageTitle{/lang}</title>\r
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
- <style type="text/css">\r
- /*<![CDATA[*/\r
- body {\r
- font-family: "Trebuchet MS", Tahoma, Verdana, Arial, Helvetica, sans-serif; \r
- color: #333;\r
- font-size: .82em;\r
- margin: 0;\r
- padding: 0;\r
- background-color: #eee;\r
- background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupBackground-{@PAGE_DIRECTION}.png{else}install.php?showImage=setupBackground-{@PAGE_DIRECTION}.png&tmpFilePrefix={@$tmpFilePrefix}{/if});\r
- background-repeat: repeat-y;\r
- background-position: {if PAGE_DIRECTION == 'ltr'}left{else}right{/if};\r
- }\r
- \r
- .page {\r
- background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupHeader-{@PAGE_DIRECTION}.jpg{else}install.php?showImage=setupHeader-{@PAGE_DIRECTION}.jpg&tmpFilePrefix={@$tmpFilePrefix}{/if});\r
- background-repeat: no-repeat;\r
- background-color: #fff;\r
- padding: 153px 40px 20px 40px;\r
- width: 720px;\r
- }\r
- \r
- .inner {\r
- padding: 10px 20px;\r
- }\r
- \r
- h1 {\r
- color: #164369;\r
- text-shadow: 0 2px 3px #bbb;\r
- font-size: 1.9em;\r
- font-weight: normal;\r
- margin: 5px 0;\r
- padding: 5px 0;\r
- }\r
- \r
- h2 {\r
- color: #164369;\r
- font-size: 1.4em;\r
- font-weight: bold;\r
- margin: 0;\r
- padding-top: 5px;\r
- }\r
- \r
- h3 {\r
- font-size: 1.3em;\r
- font-weight: bold;\r
- color: #666;\r
- margin: 0;\r
- padding: 2px 0 10px 0;\r
- }\r
- \r
- .info, .success, .warning, .error, .help {\r
- -webkit-border-radius: 5px;\r
- -moz-border-radius: 5px;\r
- }\r
- \r
- fieldset {\r
- font-size: .82em;\r
- border: 1px solid #8da4b7;\r
- margin-bottom: 10px;\r
- padding: 0;\r
- -webkit-border-radius: 5px;\r
- -moz-border-radius: 5px;\r
- }\r
- \r
- legend {\r
- color: #487397;\r
- font-size: 1em;\r
- margin: 0 10px;\r
- padding: 0 4px;\r
- }\r
- \r
- fieldset p, fieldset div {\r
- margin: 0;\r
- padding: 0 0 5px 0;\r
- }\r
- \r
- fieldset ul {\r
- list-style: none;\r
- margin: 0;\r
- padding: 0;\r
- }\r
- \r
- fieldset ul li {\r
- padding-{if PAGE_DIRECTION == 'ltr'}right{else}left{/if}: 3%;\r
- float: {if PAGE_DIRECTION == 'ltr'}left{else}right{/if};\r
- width: 30%;\r
- }\r
- \r
- hr {\r
- color: #8da4b7;\r
- background-color: #8da4b7;\r
- border: 0;\r
- margin: 10px 0;\r
- padding: 0;\r
- height: 1px;\r
- width: 100%;\r
- position: relative;\r
- clear: {if PAGE_DIRECTION == 'ltr'}left{else}right{/if};\r
- }\r
- \r
- form {\r
- padding: 0;\r
- margin: 0;\r
- }\r
- \r
- textarea, select, input[type="text"], input[type="password"] {\r
- background-color: #fafafa;\r
- border-width: 1px;\r
- border-style: solid;\r
- border-color: #666 #999 #ccc #999;\r
- background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupInputBackground.png{else}install.php?showImage=setupInputBackground.png&tmpFilePrefix={@$tmpFilePrefix}{/if});\r
- background-position: left top;\r
- background-repeat: repeat-x;\r
- min-height: 13px;\r
- }\r
- \r
- textarea, input[type="text"], input[type="password"] {\r
- width: 100%;\r
- }\r
- \r
- textarea:focus, select:focus, input[type="text"]:focus, input[type="password"]:focus {\r
- background-color: #fff9f4;\r
- border: 1px solid #fa2;\r
- background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupInputBackground.png{else}install.php?showImage=setupInputBackground.png&tmpFilePrefix={@$tmpFilePrefix}{/if});\r
- background-repeat: repeat-x;\r
- outline: 0;\r
- }\r
- \r
- textarea, select, input[type="text"], input[type="password"] {\r
- padding: 2px;\r
- -webkit-border-radius: 3px;\r
- -moz-border-radius: 3px;\r
- }\r
- \r
- label {\r
- padding-bottom: 2px;\r
- display: block;\r
- }\r
- \r
- .setupIcon {\r
- margin-{if PAGE_DIRECTION == 'ltr'}right{else}left{/if}: 30px;\r
- float: {if PAGE_DIRECTION == 'ltr'}left{else}right{/if};\r
- }\r
- \r
- .nextButton {\r
- float: {if PAGE_DIRECTION == 'ltr'}right{else}left{/if};\r
- }\r
- \r
- .copyright {\r
- font-size: .8em;\r
- }\r
- \r
- .left {\r
- float: {if PAGE_DIRECTION == 'ltr'}left{else}right{/if};\r
- }\r
- \r
- .left, .right {\r
- font-weight: bold;\r
- display: block;\r
- }\r
- \r
- .right {\r
- margin-{if PAGE_DIRECTION == 'ltr'}left{else}right{/if}: 48%;\r
- width: 48%;\r
- }\r
- \r
- .disabled {\r
- color: #b2b2b2;\r
- }\r
- \r
- .error {\r
- color: #c00;\r
- border: 1px solid #c00;\r
- background-color: #fee;\r
- padding: 4px 10px;\r
- }\r
- \r
- .errorField {\r
- color: #c00;\r
- }\r
- \r
- .errorField .inputText, .errorField select, .errorField textarea {\r
- border: 1px solid #c00;\r
- background-color: #fee;\r
- }\r
- \r
- .progress {\r
- border: 1px solid #b2b2b2;\r
- margin: {if PAGE_DIRECTION == 'ltr'}0 0 25px 128px{else}0 128px 25px 0{/if};\r
- padding: 1px;\r
- width: 300px;\r
- height: 16px;\r
- -webkit-border-radius: 3px;\r
- -moz-border-radius: 3px;\r
- }\r
- \r
- .progressBar {\r
- background-color: #f1f1f1;\r
- border-bottom: 8px solid #ddd;\r
- height: 8px;\r
- font-size: 7px;\r
- -webkit-border-radius: 1px;\r
- -moz-border-radius: 1px;\r
- }\r
- \r
- .progressText {\r
- color: #333;\r
- text-shadow: 0 1px 1px #fff;\r
- font-size: .75em;\r
- text-align: center;\r
- margin-top: -15px;\r
- }\r
- \r
- #wcfUrl {\r
- text-decoration: underline;\r
- background: transparent;\r
- border: none;\r
- padding: 0;\r
- }\r
- \r
- /*]]>*/\r
- </style>\r
- <!--[if lt IE 7]>\r
- <style type="text/css">\r
- .page {\r
- width: 800px;\r
- }\r
- .progressText {\r
- margin-top: -16px;\r
- }\r
- </style>\r
- <![endif]-->\r
- <!--[if IE]>\r
- <style type="text/css">\r
- hr {\r
- margin: 0;\r
- }\r
- fieldset p, fieldset div {\r
- min-height: 0;\r
- }\r
- </style>\r
- <![endif]-->\r
- </head>\r
-<body>\r
- <div class="page">\r
- <img class="setupIcon" src="{if 'RELATIVE_WCF_DIR'|defined}{@RELATIVE_WCF_DIR}acp/images/setupIconXL.jpg{else}install.php?showImage=setupIconXL.jpg&tmpFilePrefix={@$tmpFilePrefix}{/if}" alt="" />\r
- <h1>{lang}wcf.global.title{/lang}</h1>\r
- <div class="progress">\r
- <div class="progressBar" style="width: {@300*$progress/100|round:0}px"></div>\r
- <div class="progressText">{lang}wcf.global.progressBar{/lang}</div>\r
- </div>\r
- <hr />\r
- \r
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="{@$__wcf->getLanguage()->getPageDirection()}" xml:lang="{@$__wcf->getLanguage()->getFixedLanguageCode()}">
+ <head>
+ <title>{lang}wcf.global.progressBar{/lang} - {lang}wcf.global.pageTitle{/lang}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <style type="text/css">
+ /*<![CDATA[*/
+ body {
+ font-family: "Trebuchet MS", Tahoma, Verdana, Arial, Helvetica, sans-serif;
+ color: #333;
+ font-size: .82em;
+ margin: 0;
+ padding: 0;
+ background-color: #eee;
+ background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupBackground-{@$__wcf->getLanguage()->getPageDirection()}.png{else}install.php?showImage=setupBackground-{@$__wcf->getLanguage()->getPageDirection()}.png&tmpFilePrefix={@$tmpFilePrefix}{/if});
+ background-repeat: repeat-y;
+ background-position: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}left{else}right{/if};
+ }
+
+ .page {
+ background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupHeader-{@$__wcf->getLanguage()->getPageDirection()}.jpg{else}install.php?showImage=setupHeader-{@$__wcf->getLanguage()->getPageDirection()}.jpg&tmpFilePrefix={@$tmpFilePrefix}{/if});
+ background-repeat: no-repeat;
+ background-color: #fff;
+ padding: 153px 40px 20px 40px;
+ width: 720px;
+ }
+
+ .inner {
+ padding: 10px 20px;
+ }
+
+ h1 {
+ color: #164369;
+ text-shadow: 0 2px 3px #bbb;
+ font-size: 1.9em;
+ font-weight: normal;
+ margin: 5px 0;
+ padding: 5px 0;
+ }
+
+ h2 {
+ color: #164369;
+ font-size: 1.4em;
+ font-weight: bold;
+ margin: 0;
+ padding-top: 5px;
+ }
+
+ h3 {
+ font-size: 1.3em;
+ font-weight: bold;
+ color: #666;
+ margin: 0;
+ padding: 2px 0 10px 0;
+ }
+
+ .info, .success, .warning, .error, .help {
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ }
+
+ fieldset {
+ font-size: .82em;
+ border: 1px solid #8da4b7;
+ margin-bottom: 10px;
+ padding: 0;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ }
+
+ legend {
+ color: #487397;
+ font-size: 1em;
+ margin: 0 10px;
+ padding: 0 4px;
+ }
+
+ fieldset p, fieldset div {
+ margin: 0;
+ padding: 0 0 5px 0;
+ }
+
+ fieldset ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+
+ fieldset ul li {
+ padding-{if $__wcf->getLanguage()->getPageDirection() == 'ltr'}right{else}left{/if}: 3%;
+ float: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}left{else}right{/if};
+ width: 30%;
+ }
+
+ hr {
+ color: #8da4b7;
+ background-color: #8da4b7;
+ border: 0;
+ margin: 10px 0;
+ padding: 0;
+ height: 1px;
+ width: 100%;
+ position: relative;
+ clear: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}left{else}right{/if};
+ }
+
+ form {
+ padding: 0;
+ margin: 0;
+ }
+
+ textarea, select, input[type="text"], input[type="password"] {
+ background-color: #fafafa;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #666 #999 #ccc #999;
+ background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupInputBackground.png{else}install.php?showImage=setupInputBackground.png&tmpFilePrefix={@$tmpFilePrefix}{/if});
+ background-position: left top;
+ background-repeat: repeat-x;
+ min-height: 13px;
+ }
+
+ textarea, input[type="text"], input[type="password"] {
+ width: 100%;
+ }
+
+ textarea:focus, select:focus, input[type="text"]:focus, input[type="password"]:focus {
+ background-color: #fff9f4;
+ border: 1px solid #fa2;
+ background-image: url({if 'RELATIVE_WCF_DIR'|defined}{@' '|str_replace:'%20':RELATIVE_WCF_DIR}acp/images/setupInputBackground.png{else}install.php?showImage=setupInputBackground.png&tmpFilePrefix={@$tmpFilePrefix}{/if});
+ background-repeat: repeat-x;
+ outline: 0;
+ }
+
+ textarea, select, input[type="text"], input[type="password"] {
+ padding: 2px;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ }
+
+ label {
+ padding-bottom: 2px;
+ display: block;
+ }
+
+ .setupIcon {
+ margin-{if $__wcf->getLanguage()->getPageDirection() == 'ltr'}right{else}left{/if}: 30px;
+ float: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}left{else}right{/if};
+ }
+
+ .nextButton {
+ float: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}right{else}left{/if};
+ }
+
+ .copyright {
+ font-size: .8em;
+ }
+
+ .left {
+ float: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}left{else}right{/if};
+ }
+
+ .left, .right {
+ font-weight: bold;
+ display: block;
+ }
+
+ .right {
+ margin-{if $__wcf->getLanguage()->getPageDirection() == 'ltr'}left{else}right{/if}: 48%;
+ width: 48%;
+ }
+
+ .disabled {
+ color: #b2b2b2;
+ }
+
+ .error {
+ color: #c00;
+ border: 1px solid #c00;
+ background-color: #fee;
+ padding: 4px 10px;
+ }
+
+ .errorField {
+ color: #c00;
+ }
+
+ .errorField .inputText, .errorField select, .errorField textarea {
+ border: 1px solid #c00;
+ background-color: #fee;
+ }
+
+ .progress {
+ border: 1px solid #b2b2b2;
+ margin: {if $__wcf->getLanguage()->getPageDirection() == 'ltr'}0 0 25px 128px{else}0 128px 25px 0{/if};
+ padding: 1px;
+ width: 300px;
+ height: 16px;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ }
+
+ .progressBar {
+ background-color: #f1f1f1;
+ border-bottom: 8px solid #ddd;
+ height: 8px;
+ font-size: 7px;
+ -webkit-border-radius: 1px;
+ -moz-border-radius: 1px;
+ }
+
+ .progressText {
+ color: #333;
+ text-shadow: 0 1px 1px #fff;
+ font-size: .75em;
+ text-align: center;
+ margin-top: -15px;
+ }
+
+ #wcfUrl {
+ text-decoration: underline;
+ background: transparent;
+ border: none;
+ padding: 0;
+ }
+
+ /*]]>*/
+ </style>
+ <!--[if lt IE 7]>
+ <style type="text/css">
+ .page {
+ width: 800px;
+ }
+ .progressText {
+ margin-top: -16px;
+ }
+ </style>
+ <![endif]-->
+ <!--[if IE]>
+ <style type="text/css">
+ hr {
+ margin: 0;
+ }
+ fieldset p, fieldset div {
+ min-height: 0;
+ }
+ </style>
+ <![endif]-->
+ </head>
+<body>
+ <div class="page">
+ <img class="setupIcon" src="{if 'RELATIVE_WCF_DIR'|defined}{@RELATIVE_WCF_DIR}acp/images/setupIconXL.jpg{else}install.php?showImage=setupIconXL.jpg&tmpFilePrefix={@$tmpFilePrefix}{/if}" alt="" />
+ <h1>{lang}wcf.global.title{/lang}</h1>
+ <div class="progress">
+ <div class="progressBar" style="width: {@300*$progress/100|round:0}px"></div>
+ <div class="progressText">{lang}wcf.global.progressBar{/lang}</div>
+ </div>
+ <hr />
+
\ No newline at end of file