| @@ 274-284 (lines=11) @@ | ||
| 271 | $incontext['detected_languages'] = array(); |
|
| 272 | ||
| 273 | // Make sure the languages directory actually exists. |
|
| 274 | if (file_exists(dirname(__FILE__) . '/Themes/default/languages')) |
|
| 275 | { |
|
| 276 | // Find all the "Install" language files in the directory. |
|
| 277 | $dir = dir(dirname(__FILE__) . '/Themes/default/languages'); |
|
| 278 | while ($entry = $dir->read()) |
|
| 279 | { |
|
| 280 | if (substr($entry, 0, 8) == 'Install.' && substr($entry, -4) == '.php') |
|
| 281 | $incontext['detected_languages'][$entry] = ucfirst(substr($entry, 8, strlen($entry) - 12)); |
|
| 282 | } |
|
| 283 | $dir->close(); |
|
| 284 | } |
|
| 285 | ||
| 286 | // Didn't find any, show an error message! |
|
| 287 | if (empty($incontext['detected_languages'])) |
|
| @@ 426-436 (lines=11) @@ | ||
| 423 | $incontext['detected_languages'] = array(); |
|
| 424 | ||
| 425 | // Make sure the languages directory actually exists. |
|
| 426 | if (file_exists(dirname(__FILE__) . '/Themes/default/languages')) |
|
| 427 | { |
|
| 428 | // Find all the "Install" language files in the directory. |
|
| 429 | $dir = dir(dirname(__FILE__) . '/Themes/default/languages'); |
|
| 430 | while ($entry = $dir->read()) |
|
| 431 | { |
|
| 432 | if (substr($entry, 0, 8) == 'Install.' && substr($entry, -4) == '.php') |
|
| 433 | $incontext['detected_languages'][$entry] = ucfirst(substr($entry, 8, strlen($entry) - 12)); |
|
| 434 | } |
|
| 435 | $dir->close(); |
|
| 436 | } |
|
| 437 | ||
| 438 | // Didn't find any, show an error message! |
|
| 439 | if (empty($incontext['detected_languages'])) |
|