Exemple #1
0
 public static function load($locale = null)
 {
     self::$translations = array();
     if (!$locale && EE::is_set('_config', 'locale')) {
         $locale = EE::get('_config', 'locale');
     }
     if ($locale) {
         $file = EE::get('_dir') . '/' . EE::APP_TRANSLATIONS_DIR . '/' . $locale . '.php';
         if (file_exists($file)) {
             self::$translations = (require $file);
             return true;
         }
     }
     return false;
 }