Provides a set of static methods to aid in the use of multi-language support.
Supports the use of both a primary language and a default (fallback)
language. When the definition can not be found in the set of primary keys,
the default is used instead.
static array default_text = null
The default text for the default language if used
static array lang_files = null
An associative array containing name of all of the language files loaded and the language they pertain to
static array lang_text = null
The text for the given language
_( string $lang_key, boolean $return = false, mixed $... )
getText( string $lang_key, boolean $return = false, mixed $... )
Alias of Language::getText()
string $lang_key required
The language key identifier for this requested text
boolean $return = false
Whether to return the text or output it
mixed $...
Values to substitute in the language result. Uses sprintf(). If parameter is an array, only that value is passed to sprintf().
public static final
void
Fetches text from the loaded language file. Will search the preferred language file first, if not found in there, then will search the default language file for the $lang_key text.
string $lang_key required
The language key identifier for this requested text
boolean $return = false
Whether to return the text or output it
mixed $...
Values to substitute in the language result. Uses sprintf(). If parameter is an array, only that value is passed to sprintf().
public static final
void
Loads a language file whose properties may then be invoked.
mixed $lang_file required
A string as a single language file or array containing a list of language files to load
string $language = null
The language to load the $lang_file for (e.g. en-us), default is "Language.default" config value
string $lang_dir = "/home/repo/minphp/language/"
The directory from which to load the given language file(s), defaults to LANGDIR
public static final
void