\pm_Locale

Localization facilities

Summary

Methods
Properties
Constants
getCode()
setCode()
lmsg()
keyExists()
setTranslation()
getSection()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A

Methods

getCode()

getCode() : string

Return current locale code

Returns

string

setCode()

setCode(string  $localeCode) 

Set current locale code

Parameters

string $localeCode

lmsg()

lmsg(string  $key, array  $params = array()) : string

Translate message by key according to current locale

Parameters

string $key
array $params

Returns

string

keyExists()

keyExists(string  $key, boolean  $findSection = false) : boolean

Check if key exists in translations

Parameters

string $key
boolean $findSection

Returns

boolean

setTranslation()

setTranslation(string  $localeCode, array  $messages) 

Set translation from array

Parameters

string $localeCode
array $messages

getSection()

getSection(string  $sectionKey) : array

Get translated messages by key according to current locale

Parameters

string $sectionKey

Returns

array