public static function set($language = null)
    {
        self::$messages = array();
        $language = $language ?: self::$config['language'];
        $filename = Atomik::findFile("$language.php", Atomik::path(self::$config['dir']));
        if ($filename === false) {
            throw new AtomikException("Language '$language' does not exists");
        }
        
        $messages = include $filename;
        if (is_array($messages)) {
            self::$messages = array_merge(self::$messages, $messages);
        }
        
        Atomik::set('app.language', $language);
        self::$config['language'] = $language;
        if (isset($_SESSION)) {
            $_SESSION['__LANG'] = $language;
        }
    }
public static function set($language = null)
    {
        self::$messages = array();
        $language = $language ?: self::$config['language'];
        $filename = Atomik::findFile("$language.php", Atomik::path(self::$config['dir']));
        if ($filename === false) {
            throw new AtomikException("Language '$language' does not exists");
        }
        
        $messages = include $filename;
        if (is_array($messages)) {
            self::$messages = array_merge(self::$messages, $messages);
        }
        
        Atomik::set('app.language', $language);
        self::$config['language'] = $language;
        if (isset($_SESSION)) {
            $_SESSION['__LANG'] = $language;
        }
    }
public static function set ( $ language = null ) { self :: $ messages = array ( ) ; $ language = $ language ? : self :: $ config [ 'language' ] ; $ filename = Atomik :: findFile ( "$language.php" , Atomik :: path ( self :: $ config [ 'dir' ] ) ) ; if ( $ filename === false ) { throw new AtomikException ( "Language '$language' does not exists" ) ; } $ messages = include $ filename ; if ( is_array ( $ messages ) ) { self :: $ messages = array_merge ( self :: $ messages , $ messages ) ; } Atomik :: set ( 'app.language' , $ language ) ; self :: $ config [ 'language' ] = $ language ; if ( isset ( $ _SESSION ) ) { $ _SESSION [ '__LANG' ] = $ language ; } }
Sets the language to use

@param string $language OPTIONAL (default null) Null to use default language
Sets the language to use