src/classes/CCLang.php
public static function load( $path, $overwrite = false ) 
	{
		if ( array_key_exists( $path, static::$data[static::$current_language] ) && $overwrite === false ) 
		{
			return;
		}
		
		$file_path = CCPath::get( $path, CCDIR_LANGUAGE.static::$current_language.'/', EXT );
		
		if ( !file_exists( $file_path ) ) 
		{
			// as fallback try to load the language file of the default language
			if ( static::$current_language !== ( $default_lang = ClanCats::$config->get( 'language.default' ) ) )
			{
				$file_path = CCPath::get( $path, CCDIR_LANGUAGE.$default_lang.'/', EXT );
				
				if ( !file_exists( $file_path ) ) 
				{
					throw new CCException( "CCLang::load - could not find language file: ".$file_path );
				}
			}
			else
			{
				throw new CCException( "CCLang::load - could not find language file: ".$file_path );
			}
		}
		
		static::$data[static::$current_language][$path] = require( $file_path );
	}
public static function load( $path, $overwrite = false ) 
	{
		if ( array_key_exists( $path, static::$data[static::$current_language] ) && $overwrite === false ) 
		{
			return;
		}
		
		$file_path = CCPath::get( $path, CCDIR_LANGUAGE.static::$current_language.'/', EXT );
		
		if ( !file_exists( $file_path ) ) 
		{
			// as fallback try to load the language file of the default language
			if ( static::$current_language !== ( $default_lang = ClanCats::$config->get( 'language.default' ) ) )
			{
				$file_path = CCPath::get( $path, CCDIR_LANGUAGE.$default_lang.'/', EXT );
				
				if ( !file_exists( $file_path ) ) 
				{
					throw new CCException( "CCLang::load - could not find language file: ".$file_path );
				}
			}
			else
			{
				throw new CCException( "CCLang::load - could not find language file: ".$file_path );
			}
		}
		
		static::$data[static::$current_language][$path] = require( $file_path );
	}
public static function load ( $ path , $ overwrite = false ) { if ( array_key_exists ( $ path , static :: $ data [ static :: $ current_language ] ) && $ overwrite === false ) { return ; } $ file_path = CCPath :: get ( $ path , CCDIR_LANGUAGE . static :: $ current_language . '/' , EXT ) ; if ( ! file_exists ( $ file_path ) ) { // as fallback try to load the language file of the default language if ( static :: $ current_language !== ( $ default_lang = ClanCats :: $ config -> get ( 'language.default' ) ) ) { $ file_path = CCPath :: get ( $ path , CCDIR_LANGUAGE . $ default_lang . '/' , EXT ) ; if ( ! file_exists ( $ file_path ) ) { throw new CCException ( "CCLang::load - could not find language file: " . $ file_path ) ; } } else { throw new CCException ( "CCLang::load - could not find language file: " . $ file_path ) ; } } static :: $ data [ static :: $ current_language ] [ $ path ] = require ( $ file_path ) ; }
Load a language file into the appliaction

CCLang::load( 'some/path/to/file' );
CCLang::load( 'controller/example' );
CCLang::load( 'Blog::controller/dashboard' );

@param string			$path
@param bool			$overwrite
@return void
Load a language file into the appliaction