  |
1 | 1 | | <?php |
| |
2 | 2 | | /* |
  |
3 | | - | $Id: language.php 946 2006-08-31 13:53:35Z hpdl $ |
| |
| 3 | + | $Id: language.php 1434 2007-03-08 19:15:38Z hpdl $ |
|
4 | 4 | | |
| |
5 | 5 | | osCommerce, Open Source E-Commerce Solutions |
| |
6 | 6 | | http://www.oscommerce.com |
| |
|
|
 |
… |
|
39 | 39 | | 'text_direction' => $Qlanguages->value('text_direction'), |
| |
40 | 40 | | 'currencies_id' => $Qlanguages->valueInt('currencies_id'), |
| |
41 | 41 | | 'numeric_separator_decimal' => $Qlanguages->value('numeric_separator_decimal'), |
  |
42 | | - | 'numeric_separator_thousands' => $Qlanguages->value('numeric_separator_thousands'), |
| |
43 | | - | 'image' => 'icon.gif'); |
| |
| 42 | + | 'numeric_separator_thousands' => $Qlanguages->value('numeric_separator_thousands')); |
|
44 | 43 | | } |
| |
45 | 44 | | |
| |
46 | 45 | | $Qlanguages->freeResult(); |
| |
|
|
 |
… |
|
219 | 218 | | return $this->_languages[$this->_code]['text_direction']; |
| |
220 | 219 | | } |
| |
221 | 220 | | |
  |
222 | | - | function getImage() { |
| |
223 | | - | return $this->_languages[$this->_code]['image']; |
| |
224 | | - | } |
| |
225 | | - | |
|
226 | 221 | | function getCurrencyID() { |
| |
227 | 222 | | return $this->_languages[$this->_code]['currencies_id']; |
| |
228 | 223 | | } |
| |
|
|
 |
… |
|
234 | 229 | | function getNumericThousandsSeparator() { |
| |
235 | 230 | | return $this->_languages[$this->_code]['numeric_separator_thousands']; |
| |
236 | 231 | | } |
  |
| 232 | + | |
| |
| 233 | + | function showImage($code = null, $width = '16', $height = '10', $parameters = null) { |
| |
| 234 | + | if ( empty($code) ) { |
| |
| 235 | + | $code = $this->_code; |
| |
| 236 | + | } |
| |
| 237 | + | |
| |
| 238 | + | $image_code = strtolower(substr($code, 3)); |
| |
| 239 | + | |
| |
| 240 | + | if ( !is_numeric($width) ) { |
| |
| 241 | + | $width = 16; |
| |
| 242 | + | } |
| |
| 243 | + | |
| |
| 244 | + | if ( !is_numeric($height) ) { |
| |
| 245 | + | $height = 10; |
| |
| 246 | + | } |
| |
| 247 | + | |
| |
| 248 | + | return osc_image('images/worldflags/' . $image_code . '.png', $this->_languages[$code]['name'], $width, $height, $parameters); |
| |
| 249 | + | } |
  |
237 | 250 | | } |
| |
238 | 251 | | ?> |