@@ -10,7 +10,7 @@ |
||
| 10 | 10 | * @version 0.1 * @copyright Caffeina srl - 2015 - http://caffeina.it |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | - class Language extends Dictionary { |
|
| 13 | + class Language extends Dictionary { |
|
| 14 | 14 | use Module; |
| 15 | 15 | protected static $current_lang = 'en'; |
| 16 | 16 | |
@@ -14,16 +14,16 @@ |
||
| 14 | 14 | use Module; |
| 15 | 15 | protected static $current_lang = 'en'; |
| 16 | 16 | |
| 17 | - public static function translate($text,$params=null){ |
|
| 18 | - $result = static::get(static::$current_lang.'.'.strtolower($text),$text); |
|
| 17 | + public static function translate($text, $params = null) { |
|
| 18 | + $result = static::get(static::$current_lang.'.'.strtolower($text), $text); |
|
| 19 | 19 | return $params ? Text::render($result) : $result; |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | - public static function using($lang){ |
|
| 22 | + public static function using($lang) { |
|
| 23 | 23 | static::$current_lang = strtolower(trim($lang)); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | - public static function load($lang, $dictfile){ |
|
| 26 | + public static function load($lang, $dictfile) { |
|
| 27 | 27 | ob_start(); $lang = include($dictfile); ob_end_clean(); |
| 28 | 28 | static::merge([$lang => $dictfile]); |
| 29 | 29 | } |