xajaxLanguageManager. inc.php

Contains the code that manages the inclusion of alternate language support files; so debug and error messages can be shown in a language other than the default (english) language.

Summary
Contains the code that manages the inclusion of alternate language support files; so debug and error messages can be shown in a language other than the default (english) language.
Please see copyright.inc.php for a detailed description, copyright and license information.
This class contains the default language (english) and the code used to supply debug and error messages upon request; as well as the code used to load alternate language text as requested via the xajax::configure function.
An array of the currently registered languages.
The currently configured language.
Construct and initialize the one and only xajax language manager object.
Implements the singleton pattern: provides a single instance of the xajax language manager object to all object which request it.
Called to register an array of alternate language messages.
Called by the main xajax object and other objects during the initial page generation or request processing phase to obtain language specific debug and error messages.

xajaxLanguageManager class

Please see copyright.inc.php for a detailed description, copyright and license information.

xajaxLanguageManager

This class contains the default language (english) and the code used to supply debug and error messages upon request; as well as the code used to load alternate language text as requested via the xajax::configure function.

Summary
An array of the currently registered languages.
The currently configured language.
Construct and initialize the one and only xajax language manager object.
Implements the singleton pattern: provides a single instance of the xajax language manager object to all object which request it.
Called to register an array of alternate language messages.
Called by the main xajax object and other objects during the initial page generation or request processing phase to obtain language specific debug and error messages.

Variables

aMessages

var $aMessages

An array of the currently registered languages.

sLanguage

var $sLanguage

The currently configured language.

Functions

xajaxLanguageManager

function xajaxLanguageManager()

Construct and initialize the one and only xajax language manager object.

getInstance

function &getInstance()

Implements the singleton pattern: provides a single instance of the xajax language manager object to all object which request it.

configure

function configure($sName,
$mValue)

Called by the main xajax object as configuration options are set.  See also

xajax::configure.  The xajaxLanguageManager tracks the following configuration options:

  • language (string, default ‘en’): The currently selected language.

register

function register($sLanguage,
$aMessages)

Called to register an array of alternate language messages.

sLanguage(string) the character code which represents the language being registered.
aMessages(array) the array of translated debug and error messages

getText

function getText($sMessage)

Called by the main xajax object and other objects during the initial page generation or request processing phase to obtain language specific debug and error messages.

sMessage(string): A code indicating the message text being requested.
This file contains detailed information regarding the xajax project, current version, copyrights, licnese and documentation.
function configure($sName,
$mValue)
Call this function to set options that will effect the processing of xajax requests.
var $aMessages
An array of the currently registered languages.
var $sLanguage
The currently configured language.
function xajaxLanguageManager()
Construct and initialize the one and only xajax language manager object.
function &getInstance()
Implements the singleton pattern: provides a single instance of the xajax language manager object to all object which request it.
function configure($sName,
$mValue)
xajax::configure.
function register($sLanguage,
$aMessages)
Called to register an array of alternate language messages.
function getText($sMessage)
Called by the main xajax object and other objects during the initial page generation or request processing phase to obtain language specific debug and error messages.