Skip to content

CI_Lang

Mathieu Nayrolles edited this page Jan 20, 2016 · 1 revision

CI_Lang

Language Class

  • Class name: CI_Lang
  • Namespace:

Properties

$language

public array $language = array()

List of translations

  • Visibility: public

$is_loaded

public array $is_loaded = array()

List of loaded language files

  • Visibility: public

Methods

__construct

void CI_Lang::__construct()

Class constructor

  • Visibility: public

load

void|array<mixed,string> CI_Lang::load(mixed $langfile, string $idiom, boolean $return, boolean $add_suffix, string $alt_path)

Load a language file

  • Visibility: public

Arguments

  • $langfile mixed - <p>Language file name</p>
  • $idiom string - <p>Language name (english, etc.)</p>
  • $return boolean - <p>Whether to return the loaded array of translations</p>
  • $add_suffix boolean - <p>Whether to add suffix to $langfile</p>
  • $alt_path string - <p>Alternative path to look for the language file</p>

line

string CI_Lang::line(string $line, boolean $log_errors)

Language line

Fetches a single line of text from the language array

  • Visibility: public

Arguments

  • $line string - <p>Language line key</p>
  • $log_errors boolean - <p>Whether to log an error message if the line is not found</p>
Clone this wiki locally