I18n.php.diff
| I18n.php 2009-04-30 11:33:57.000000000 +0200 | ||
|---|---|---|
| 44 | 44 | |
| 45 | 45 |
I18n::$locale = $locale; |
| 46 | 46 |
} |
| 47 | ||
| 48 |
public static function get_locale() |
|
| 47 |
|
|
| 48 |
|
|
| 49 |
/** |
|
| 50 |
* |
|
| 51 |
* Returns the locale. |
|
| 52 |
* If $ext is true, the UTF8 extension gets returned as well, otherwise, just the language code. |
|
| 53 |
* Defaults to true. |
|
| 54 |
* |
|
| 55 |
* @return The locale |
|
| 56 |
* @param boolean $ext[optional] Get the Extension? |
|
| 57 |
*/ |
|
| 58 |
public static function get_locale($ext = true) |
|
| 49 | 59 |
{
|
| 50 |
return I18n::$locale; |
|
| 60 |
if($ext) |
|
| 61 |
return I18n::$locale; |
|
| 62 |
else |
|
| 63 |
return arr::get(explode('.', I18n::$locale), 0);
|
|
| 51 | 64 |
} |
| 52 | 65 |
|
| 53 | 66 |
|
| ... | ... | |
| 62 | 75 |
{
|
| 63 | 76 |
if ( ! I18n::$translations) |
| 64 | 77 |
{
|
| 65 |
$locale = explode('_', I18n::$locale);
|
|
| 78 |
$locale = explode('_', I18n::get_locale(FALSE));
|
|
| 66 | 79 |
|
| 67 | 80 |
// Get the translation files |
| 68 | 81 |
$translation_files = Kohana::find_file('i18n', $locale[0]);
|