MediaWiki fundraising/REL1_35
|
Convenience methods for translating and localizing interface messages. More...
Static Public Member Functions | |
static | getCountrySpecificMessage ( $key, $country, $language, $params=[]) |
Retrieves and translates a country-specific message, or the default if no country-specific version exists. | |
static | languageSpecificFallback ( $language='en', $msg_keys=[], $params=[]) |
languageSpecificFallback - returns the text of the first existing message in the requested language. | |
static | makeSafe ( $string) |
This function limits the possible characters passed as template keys and values to letters, numbers, hyphens and underscores. | |
Convenience methods for translating and localizing interface messages.
Definition at line 6 of file MessageUtils.php.
|
static |
Retrieves and translates a country-specific message, or the default if no country-specific version exists.
string | $key | |
string | $country | |
string | $language | |
array | $params | extra message parameters |
Definition at line 53 of file MessageUtils.php.
References languageSpecificFallback().
Referenced by Gateway_Form_Mustache\getErrors(), Gateway_Form_Mustache\l10n(), and GatewayPage\setClientVariables().
|
static |
languageSpecificFallback - returns the text of the first existing message in the requested language.
If no messages are found in that language, the function returns the first existing fallback message.
string | $language | the code of the requested language |
array | $msg_keys | |
array | $params | extra message parameters |
InvalidArgumentException |
Definition at line 19 of file MessageUtils.php.
Referenced by getCountrySpecificMessage().
|
static |
This function limits the possible characters passed as template keys and values to letters, numbers, hyphens and underscores.
The function also performs standard escaping of the passed values.
string | $string | The unsafe string to escape and check for invalid characters |
Definition at line 67 of file MessageUtils.php.
Referenced by DonationData\setAppeal().