addLoader('array', new Translation\Loader\ArrayLoader()); parent::__construct($locale, $formatter, $cacheDir, $debug); } /** * Reset messages of a locale (all locale if no locale passed). * Remove custom messages and reload initial messages from matching * file in Lang directory. * * @param string|null $locale * * @return bool */ public function resetMessages($locale = null) { if ($locale === null) { static::$messages = array(); return true; } if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) { static::$messages[$locale] = require $filename; $this->addResource('array', static::$messages[$locale], $locale); return true; } return false; } /** * Init messages language from matching file in Lang directory. * * @param string $locale * * @return bool */ protected function loadMessagesFromFile($locale) { if (isset(static::$messages[$locale])) { return true; } return $this->resetMessages($locale); } /** * Set messages of a locale and take file first if present. * * @param string $locale * @param array $messages * * @return $this */ public function setMessages($locale, $messages) { $this->loadMessagesFromFile($locale); $this->addResource('array', $messages, $locale); static::$messages[$locale] = array_merge( isset(static::$messages[$locale]) ? static::$messages[$locale] : array(), $messages ); return $this; } /** * Get messages of a locale, if none given, return all the * languages. * * @param string|null $locale * * @return array */ public function getMessages($locale = null) { return $locale === null ? static::$messages : static::$messages[$locale]; } /** * Set the current translator locale and indicate if the source locale file exists * * @param string $locale locale ex. en * * @return bool */ public function setLocale($locale) { $locale = preg_replace_callback('/[-_]([a-z]{2,})/', function ($matches) { // _2-letters is a region, _3+-letters is a variant return '_'.call_user_func(strlen($matches[1]) > 2 ? 'ucfirst' : 'strtoupper', $matches[1]); }, strtolower($locale)); if ($this->loadMessagesFromFile($locale)) { parent::setLocale($locale); return true; } return false; } } __halt_compiler();----SIGNATURE:----G7hpgVJZC2HIaTNj2G2oZw7rjhhpR5ZAjJ1p4/Ue9ShJFZYoGkbkkGBFZ1CzNCeHJcyTzAARd9XUptnptmgbrZkJtauGumjuUbMTS9XVOLiS2uWaHDNyb4VYTKEVqPgmBJ2j6m6oqE7wOrji6xPb+hGhPBZMk7tnQ6UbN5uX8h1m1zbNcHfwr3nwSHcdMlqX9Yo63CdITukxkNjFXeOZTieTr2fFcvGbJ1+0VX+U4jGhJR/V4WkqIYn9Cj7GVM0u8LlxU2BrO3jLhVKYHAVKriKuul+8e5d/3UE3okMmyVLoWXlO8uhiGsneVsFToXoWx3BG54kZsB62br5VqrcJ/s7BsTQ4Lqsrfy/Eaj+H4a4KBg6gUAMddHBLxiPw/EG3mmzIev/EwttaIB33yHhaSs0aRekcq4Zo2xG4Hfx13LPHUqxBeqDOGt+FiWMdRJcCmjuC4rReUjRDuyyKfqYWkz6uILLybXRB67AkiSx80iBMj7qdSLDp7N/JngbaIM5MTNfA4+0337IGeI8TX4ABczafyzINwmlPuqHA6FQQfTOof4QXQVj3B8p553VyNxPhFiw+Powb8uAOm/duz7h1V+00x0u3Kfd/KR6Tqr01WbiGG3e1SqKSZf7EEgu1dUztIoKBp/NgKa0fylEkOwAHQ6Y/v2V8vg7XFkav7yncgiE=----ATTACHMENT:----NTU3ODUyMjU5MDkyMDUyNyAyMzM0Mzc1OTc4ODg0NTg5IDE4ODEwMTU5MDQ5MjE2MzI=