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',
...
];
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

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
$localeDirThe directory
$language

Definition at line 48 of file FileMessage.php.

Member Function Documentation

◆ getText()

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

Implements Message.

Definition at line 61 of file FileMessage.php.

◆ getAll()

getAll (   $lang = '')
See also
Message::getAll()

Implements Message.

Definition at line 86 of file FileMessage.php.