  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: language.php 387 2006-01-18 16:49:58Z hpdl $ |
| |
| 3 | + | $Id: language.php 393 2006-01-20 22:54:31Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
37 | 37 | | 'time_format' => $Qlanguages->value('time_format'), |
| |
38 | 38 | | 'text_direction' => $Qlanguages->value('text_direction'), |
| |
39 | 39 | | 'image' => $Qlanguages->value('image'), |
  |
40 | | - | 'directory' => $Qlanguages->value('directory'), |
|
41 | 40 | | 'currencies_id' => $Qlanguages->valueInt('currencies_id'), |
| |
42 | 41 | | 'numeric_separator_decimal' => $Qlanguages->value('numeric_separator_decimal'), |
| |
43 | 42 | | 'numeric_separator_thousands' => $Qlanguages->value('numeric_separator_thousands')); |
| |
|
|
 |
… |
|
53 | 52 | | function load($key) { |
| |
54 | 53 | | global $osC_Cache; |
| |
55 | 54 | | |
  |
56 | | - | if ($osC_Cache->read('languages-english-' . $key)) { |
| |
| 55 | + | if ($osC_Cache->read('languages-' . $this->_code . '-' . $key)) { |
|
57 | 56 | | $this->_definitions = array_merge($this->_definitions, $osC_Cache->getCache()); |
| |
58 | 57 | | } else { |
  |
59 | | - | $osC_XML = new osC_XML('includes/languages/english.xml'); |
| |
| 58 | + | $osC_XML = new osC_XML('includes/languages/' . $this->_code . '.xml'); |
|
60 | 59 | | $osC_XML->parse(); |
| |
61 | 60 | | |
| |
62 | 61 | | $definitions = $osC_XML->getArray(); |
| |
|
|
 |
… |
|
215 | 214 | | return $this->_languages[$this->_code]['image']; |
| |
216 | 215 | | } |
| |
217 | 216 | | |
  |
218 | | - | function getDirectory() { |
| |
219 | | - | return $this->_languages[$this->_code]['directory']; |
| |
220 | | - | } |
| |
221 | | - | |
|
222 | 217 | | function getCurrencyID() { |
| |
223 | 218 | | return $this->_languages[$this->_code]['currencies_id']; |
| |
224 | 219 | | } |
| |
|
|
 |
… |
|
230 | 225 | | function getNumericThousandsSeparator() { |
| |
231 | 226 | | return $this->_languages[$this->_code]['numeric_separator_thousands']; |
| |
232 | 227 | | } |
  |
233 | | - | |
| |
234 | | - | function load_____old($definition = false) { |
| |
235 | | - | if (is_string($definition)) { |
| |
236 | | - | include('includes/languages/' . $this->getDirectory() . '/' . $definition); |
| |
237 | | - | } else { |
| |
238 | | - | include('includes/languages/' . $this->getDirectory() . '.php'); |
| |
239 | | - | } |
| |
240 | | - | } |
  |
241 | 228 | | } |
| |
242 | 229 | | ?> |