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',
ingo herwig

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 = '' 


$localeDirThe directory

Definition at line 48 of file FileMessage.php.

Member Function Documentation

◆ getText()

getText (   $message,
  $parameters = null,
  $lang = '' 
See also

Implements Message.

Definition at line 61 of file FileMessage.php.

◆ getAll()

getAll (   $lang = '')
See also

Implements Message.

Definition at line 86 of file FileMessage.php.