PHP Class CI_Lang, TastyIgniter

Author: ExpressionEngine Dev Team
Show file Open project: tastyigniter/tastyigniter Class Usage Examples

Public Properties

Property Type Description
$is_loaded array List of loaded language files
$language array List of translations

Public Methods

Method Description
__construct ( ) : void Class constructor
line ( string $line, boolean $log_errors = TRUE ) : string Language line
load ( mixed $langfile, string $idiom = '', boolean $return = FALSE, boolean $add_suffix = TRUE, string $alt_path = '' ) : void | string[] Load a language file

Method Details

__construct() public method

Class constructor
public __construct ( ) : void
return void

line() public method

Fetches a single line of text from the language array
public line ( string $line, boolean $log_errors = TRUE ) : string
$line string Language line key
$log_errors boolean Whether to log an error message if the line is not found
return string Translation

load() public method

Load a language file
public load ( mixed $langfile, string $idiom = '', boolean $return = FALSE, boolean $add_suffix = TRUE, string $alt_path = '' ) : void | string[]
$langfile mixed Language file name
$idiom string Language name (english, etc.)
$return boolean Whether to return the loaded array of translations
$add_suffix boolean Whether to add suffix to $langfile
$alt_path string Alternative path to look for the language file
return void | string[] Array containing translations, if $return is set to TRUE

Property Details

$is_loaded public property

List of loaded language files
public array $is_loaded
return array

$language public property

List of translations
public array $language
return array