Changeset 4578 for trunk/core/localization.core.php
- Timestamp:
- 08/15/10 18:45:12 (22 months ago)
- File:
-
- 1 edited
-
trunk/core/localization.core.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/localization.core.php
r4544 r4578 24 24 * 25 25 * @license GNU/GPL v2 or (at your option) any later version, see "/doc/LICENSE". 26 *27 26 * @author Jens-André Koch <vain@clansuite.com> 28 27 * @copyright Jens-André Koch (2005 - onwards) 29 *30 28 * @link http://www.clansuite.com 31 * @link http://gna.org/projects/clansuite 32 * 29 * 33 30 * @version SVN: $Id$ 34 31 */ … … 42 39 /** 43 40 * Clansuite Core Class for Localization (l10n) & Internationalization (i18n) Handling 44 *45 * @author Jens-André Koch <vain@clansuite.com>46 * @copyright Jens-André Koch (2005 - onwards)47 41 * 48 42 * @category Clansuite … … 66 60 67 61 # References 68 private $config = null;62 private static $config = null; 69 63 70 64 public function __construct(Clansuite_Config $config) 71 65 { 72 66 # Set Reference to Config 73 $this->config = $config;67 self::$config = $config; 74 68 75 69 # Set Locale Defaults 76 70 $this->domain = 'clansuite'; 77 $this->encoding = $config['language']['outputcharset'];71 $this->encoding = self::$config['language']['outputcharset']; 78 72 79 73 # Get Locale … … 101 95 * @link http://www.gnu.org/software/gettext/manual/gettext.html GNU Gettext 102 96 */ 103 if ( function_exists('_get_reader') === false)97 if(function_exists('_get_reader') === false) 104 98 { 105 99 include ROOT_LIBRARIES . '/php-gettext/gettext.inc'; … … 131 125 if(empty($this->locale)) # 3) get the default language from config as fallback 132 126 { 133 $this->locale = $this->config['language']['language'];127 $this->locale = self::$config['language']['language']; 134 128 } 135 129 } … … 154 148 public function loadTextDomain($category, $domain, $locale, $module = null) 155 149 { 156 # if, $locale string is not over 3 -> $locale = "en", build "en_EN" 150 #Clansuite_Debug::firebug($module); 151 152 # if, $locale string is not over 3 chars long -> $locale = "en", build "en_EN" 157 153 if(isset($locale{3}) == false) 158 154 { … … 174 170 $domain_directory = ROOT_LANGUAGES; 175 171 } 176 else # tp a specific module directory 177 { 178 172 else # set a specific module directory 173 { 179 174 $domain_directory = ROOT_MOD . $module . DS . 'languages' . DS; 180 175 } … … 185 180 T_textdomain($domain); 186 181 187 #Clansuite_Debug::firebug('<p>Textdomain "' .$domain .'" loaded from path "'. $domain_directory .'" </p>');182 #Clansuite_Debug::firebug('<p>Textdomain "' .$domain .'" loaded from path "'. $domain_directory .'" for "'. $module .'"</p>'); 188 183 return true; 189 184 }
Note: See TracChangeset
for help on using the changeset viewer.
