FileMessage Class Reference
Detailed Description
FileMessage retrieves localized messages from files, that are stored in the localization directory.
Inside this directory there must be a messages_$lang.php files for each language defining the translation for each message in an associative array called $messages.
For example the messages_de file could have the following content:
$messages = [
'up' => 'hoch',
'down' => 'runter',
...
];
Definition at line 33 of file FileMessage.php.
Inheritance diagram for FileMessage:
Public Member Functions | |
__construct ($localeDir, $language='') | |
getText ($message, $parameters=null, $lang='') | |
getAll ($lang='') | |
Constructor & Destructor Documentation
◆ __construct()
__construct | ( | $localeDir, | |
$language = '' |
|||
) |
Constructor.
- Parameters
-
$localeDir The directory $language
Definition at line 48 of file FileMessage.php.
Member Function Documentation
◆ getText()
getText | ( | $message, | |
$parameters = null , |
|||
$lang = '' |
|||
) |
◆ getAll()
getAll | ( | $lang = '' | ) |