  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: language.php 377 2006-01-09 14:47:49Z hpdl $ |
| |
| 3 | + | $Id: language.php 386 2006-01-12 11:36:39Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
29 | 29 | | while ($Qlanguages->next()) { |
| |
30 | 30 | | $this->_languages[$Qlanguages->value('code')] = array('id' => $Qlanguages->valueInt('languages_id'), |
| |
31 | 31 | | 'name' => $Qlanguages->value('name'), |
  |
| 32 | + | 'locale' => $Qlanguages->value('locale'), |
| |
| 33 | + | 'charset' => $Qlanguages->value('charset'), |
| |
| 34 | + | 'date_format_short' => $Qlanguages->value('date_format_short'), |
| |
| 35 | + | 'date_format_long' => $Qlanguages->value('date_format_long'), |
| |
| 36 | + | 'time_format' => $Qlanguages->value('time_format'), |
| |
| 37 | + | 'text_direction' => $Qlanguages->value('text_direction'), |
|
32 | 38 | | 'image' => $Qlanguages->value('image'), |
  |
33 | | - | 'directory' => $Qlanguages->value('directory')); |
| |
| 39 | + | 'directory' => $Qlanguages->value('directory'), |
| |
| 40 | + | 'currencies_id' => $Qlanguages->valueInt('currencies_id'), |
| |
| 41 | + | 'numeric_separator_decimal' => $Qlanguages->value('numeric_separator_decimal'), |
| |
| 42 | + | 'numeric_separator_thousands' => $Qlanguages->value('numeric_separator_thousands')); |
|
34 | 43 | | } |
| |
35 | 44 | | |
| |
36 | 45 | | $Qlanguages->freeResult(); |
| |
|
|
 |
… |
|
140 | 149 | | return $this->_code; |
| |
141 | 150 | | } |
| |
142 | 151 | | |
  |
| 152 | + | function getLocale() { |
| |
| 153 | + | return $this->_languages[$this->_code]['locale']; |
| |
| 154 | + | } |
| |
| 155 | + | |
| |
| 156 | + | function getCharacterSet() { |
| |
| 157 | + | return $this->_languages[$this->_code]['charset']; |
| |
| 158 | + | } |
| |
| 159 | + | |
| |
| 160 | + | function getDateFormatShort() { |
| |
| 161 | + | return $this->_languages[$this->_code]['date_format_short']; |
| |
| 162 | + | } |
| |
| 163 | + | |
| |
| 164 | + | function getDateFormatLong() { |
| |
| 165 | + | return $this->_languages[$this->_code]['date_format_long']; |
| |
| 166 | + | } |
| |
| 167 | + | |
| |
| 168 | + | function getTimeFormat() { |
| |
| 169 | + | return $this->_languages[$this->_code]['time_format']; |
| |
| 170 | + | } |
| |
| 171 | + | |
| |
| 172 | + | function getTextDirection() { |
| |
| 173 | + | return $this->_languages[$this->_code]['text_direction']; |
| |
| 174 | + | } |
| |
| 175 | + | |
|
143 | 176 | | function getImage() { |
| |
144 | 177 | | return $this->_languages[$this->_code]['image']; |
| |
145 | 178 | | } |
| |
|
|
 |
… |
|
148 | 181 | | return $this->_languages[$this->_code]['directory']; |
| |
149 | 182 | | } |
| |
150 | 183 | | |
  |
| 184 | + | function getCurrencyID() { |
| |
| 185 | + | return $this->_languages[$this->_code]['currencies_id']; |
| |
| 186 | + | } |
| |
| 187 | + | |
| |
| 188 | + | function getNumericDecimalSeparator() { |
| |
| 189 | + | return $this->_languages[$this->_code]['numeric_separator_decimal']; |
| |
| 190 | + | } |
| |
| 191 | + | |
| |
| 192 | + | function getNumericThousandsSeparator() { |
| |
| 193 | + | return $this->_languages[$this->_code]['numeric_separator_thousands']; |
| |
| 194 | + | } |
| |
| 195 | + | |
  |
151 | 196 | | function load($definition = false) { |
| |
152 | 197 | | if (is_string($definition)) { |
| |
153 | 198 | | include('includes/languages/' . $this->getDirectory() . '/' . $definition); |