Changeset 7943
- Timestamp:
- 03/18/08 00:46:09 (5 years ago)
- Files:
-
- branches/1.1/lib/i18n/sfI18N.class.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/i18n/sfI18N.class.php
r7614 r7943 66 66 67 67 $this->dispatcher->connect('user.change_culture', array($this, 'listenToChangeCultureEvent')); 68 $this->dispatcher->connect('controller.change_action', array($this, 'listenToChangeActionEvent')); 68 69 if($this->isMessageSourceFileBased($this->options['source'])) 70 { 71 $this->dispatcher->connect('controller.change_action', array($this, 'listenToChangeActionEvent')); 72 } 69 73 } 70 74 … … 144 148 $this->culture = $culture; 145 149 150 // change user locale for formatting, collation, and internal error messages 151 setlocale(LC_ALL, $culture.'.utf8'); 152 146 153 if ($this->messageSource) 147 154 { … … 160 167 if (!isset($this->messageSource)) 161 168 { 162 $this->setMessageSource($this->configuration->getI18NGlobalDirs(), $this->culture); 169 $dirs = ($this->isMessageSourceFileBased($this->options['source'])) ? $this->configuration->getI18NGlobalDirs() : null; 170 $this->setMessageSource($dirs, $this->culture); 163 171 } 164 172