Get all the messages
static string
getMessages
(integer $messageId, [string $module = MOD_STANDARD_CODENAME])
-
integer
$messageId: The ID of the message to get
-
string
$module: The codename of the module owner of the message
Constructor.
Build the language by its code
void
__construct
([ $code = ''])
Create messages.
Id
createMessage
(string $sCodename, array $aMessages)
-
string
$sCodename: Module's codename.
-
array
$aMessages: Localised message. $sLanguageCode => $sMessage
Delete messages.
boolean
deleteMessage
( $sCodename, $iId)
End prefetching for a given module
- End constant declarion comparaison
- Get all messages for all new constants declared
boolean
endPrefetch
([string $module = MOD_STANDARD_CODENAME])
-
string
$module: The codename of the module owner of the message
Get the code.
string
getCode
()
Get the date format.
string
getDateFormat
()
Get the date format mask.
string
getDateFormatMask
()
Get the message with simple quotes escaped
string
getJsMessage
(integer $messageId, [array(string) $parameters = false], [string $module = MOD_STANDARD_CODENAME])
-
integer
$messageId: The ID of the message to get
-
array(string)
$parameters: An array of parameters which will replace %s in the returned string
-
string
$module: The codename of the module owner of the message
Get the label.
string
getLabel
()
Get the message translated into the specified language
string
getMessage
(integer $messageId, [array(string) $parameters = false], [string $module = MOD_STANDARD_CODENAME], [boolean $usePriority = true])
-
integer
$messageId: The ID of the message to get
-
array(string)
$parameters: An array of parameters which will replace %s in the returned string
-
string
$module: The codename of the module owner of the message
-
boolean
$usePriority: : If message does not exists, use language priority to get it (default : true).
Get the array of modules codenames which can't use this language in their backoffice.
array(string)
getModulesDenied
()
Return the next module message id
the
getNextMessageId
( $sCodename)
Is this language available for backoffice use ?
boolean
isAvailableForBackoffice
()
Is this language available for backoffice use ?
boolean
setAvailableForBackoffice
( $status)
Set the code.
boolean
setCode
( $code)
Set the date format.
boolean
setDateFormat
( $format)
Set the label.
boolean
setLabel
( $label)
Set the array of modules codenames which can't use this language in their backoffice.
array(string)
setModulesDenied
( $modules)
Start prefetching for a given module
- Start constant declarion comparaison
boolean
startPrefetch
([string $module = MOD_STANDARD_CODENAME])
-
string
$module: The codename of the module owner of the message
Update messages.
boolean
updateMessage
(string $sCodename, integer $iId, array $aMessages)
-
string
$sCodename: Module's codename.
-
integer
$iId: Messages id.
-
array
$aMessages: Localised message. $sLanguageCode => $sMessage
Writes the language Data into persistence (MySQL for now).
boolean
writeToPersistence
()
Get the message translated into the specified language old function keeped for compatibility with old modules
string
_getOldMessage
(integer $messageId, [array(string) $parameters = false], [string $module = ''])
-
integer
$messageId: The ID of the message to get
-
array(string)
$parameters: An array of parameters which will replace %s in the returned string
-
string
$module: The codename of the module owner of the message
Get a message stored
string
_getPrefetchedMessage
(integer $messageId, [string $module = MOD_STANDARD_CODENAME])
-
integer
$messageId: The message Id to store
-
string
$module: The codename of the module owner of the message
Store a message already loaded from DB for further access
boolean
_storeMessage
(integer $messageId, [string $module = MOD_STANDARD_CODENAME], string $message)
-
integer
$messageId: The message Id to store
-
string
$module: The codename of the module owner of the message
-
string
$message: The message to store
Inherited Methods
Inherited From CMS_grandFather
CMS_grandFather::autoload()
CMS_grandFather::hasError()
CMS_grandFather::log()
CMS_grandFather::PHPErrorHandler()
CMS_grandFather::raiseError()
CMS_grandFather::setDebug()
CMS_grandFather::setLog()
CMS_grandFather::_raiseError()
CMS_grandFather::__call()