/** * Load translations * * @static * @access public * @param string $language Locale code: fr_FR */ public static function load($language) { setlocale(LC_TIME, $language . '.UTF-8', $language); $filename = self::PATH . $language . DIRECTORY_SEPARATOR . 'translations.php'; if (file_exists($filename)) { self::$locales = (require $filename); } else { self::$locales = array(); } }
/** * Clear locales stored in memory * * @static * @access public */ public static function unload() { self::$locales = array(); }