Summary
- File
- Package hierarchy Core\Lang
- Class hierarchy \LangLoader
set_locale(string $locale)
sets the language locale
string | $locale | the locale |
None found |
get_locale() : string
Returns the current language locale
the current language locale
None found |
get_available_langs()
None found |
get_default_lang()
None found |
get_message(string $message_id, string $filename, string $module = '') : string
string | $message_id | the language message identifier |
string | $filename | the language filename |
string | $module | the module to look for languages files in |
the localized message
None found |
filename_exists(string $filename, string $module = '') : boolean
Check if the language file exists
string | $filename | the language filename |
string | $module | the module to look for languages files in |
true if filename exists, false otherwise
None found |
get(string $filename, string $module = '', string $forced_file = '') : \string[string]
Retrieves the language file <code>$filename</code> in <code>/$module/lang/$locale/$filename.php</code> If module is empty, the kernel lang folder will be used
string | $filename | the language filename |
string | $module | the module to look for languages files in |
string | $forced_file | the language filename to return inevitably |
the lang array which keys are languages identifiers and values the translated messages
None found |
clear_lang_cache()
clear the lang cache (for unit test only)
None found |
get_raw( $folder, $filename, $forced_file = '')
$folder | ||
$filename | ||
$forced_file |
None found |
load( $lang_id, $folder, $filename, $forced_file = '')
$lang_id | ||
$folder | ||
$filename | ||
$forced_file |
None found |
get_real_lang_path(string $folder, string $filename, string $forced_file = '', boolean $throw_exception_on_failure = true) : string
returns the real language file path, trying first to load the localized language file and if it's not possible, use the default locale one.
string | $folder | the folder to look in |
string | $filename | the language filename |
string | $forced_file | the language filename to return inevitably |
boolean | $throw_exception_on_failure | tell if throw an exception on failure. If set to false, false will be returned |
the real language file path
None found |
get_ram_cache() : \RAMDataStore
None found |