Elgg
Version 4.x
|
Go to the source code of this file.
Functions | |
elgg_echo ($message_key, array $args=[], $language="") | |
Elgg language module Functions to manage language and translations. More... | |
add_translation ($country_code, $language_array) | |
Add a translation. More... | |
get_current_language () | |
Get the current system/user language or "en". More... | |
elgg_language_key_exists ($key, $language= 'en') | |
Check if a given language key exists. More... | |
add_translation | ( | $country_code, | |
$language_array | |||
) |
Add a translation.
Translations are arrays in the Zend Translation array format, eg:
$english = array('message1' => 'message1', 'message2' => 'message2'); $german = array('message1' => 'Nachricht1','message2' => 'Nachricht2');
string | $country_code | Standard country code (eg 'en', 'nl', 'es') |
array | $language_array | Formatted array of strings |
Definition at line 35 of file languages.php.
elgg_echo | ( | $message_key, | |
array | $args = [] , |
||
$language = "" |
|||
) |
Elgg language module Functions to manage language and translations.
Given a message key, returns an appropriately translated full-text string
string | $message_key | The short message code |
array | $args | An array of arguments to pass through vsprintf(). |
string | $language | Optionally, the standard language code (defaults to site/user default, then English) |
Definition at line 18 of file languages.php.
elgg_language_key_exists | ( | $key, | |
$language = 'en' |
|||
) |
Check if a given language key exists.
string | $key | The translation key |
string | $language | The language. Provided an English translation exists for all created keys, then devs can generally use the default "en", regardless of the site/user language. |
Definition at line 61 of file languages.php.
get_current_language | ( | ) |
Get the current system/user language or "en".
Definition at line 44 of file languages.php.