Elgg  Version 3.0
languages.php
Go to the documentation of this file.
1 <?php
21 function elgg_echo($message_key, array $args = [], $language = "") {
22  return elgg()->echo($message_key, $args, $language);
23 }
24 
38 function add_translation($country_code, $language_array) {
39  return elgg()->translator->addTranslation($country_code, $language_array);
40 }
41 
48  return elgg()->translator->getCurrentLanguage();
49 }
50 
56 function get_language() {
57  return elgg()->translator->getCurrentLanguage();
58 }
59 
68 function get_installed_translations($calculate_completeness = false) {
69  return elgg()->translator->getInstalledTranslations($calculate_completeness);
70 }
71 
80  return elgg()->translator->getLanguageCompleteness($language);
81 }
82 
97  return elgg()->translator->languageKeyExists($key, $language);
98 }
99 
107  return elgg()->translator->getAvailableLanguages();
108 }
elgg_language_key_exists($key, $language= 'en')
Check if a given language key exists.
Definition: languages.php:96
add_translation($country_code, $language_array)
Add a translation.
Definition: languages.php:38
get_current_language()
Get the current system/user language or "en".
Definition: languages.php:47
get_language()
Detect the current system/user language or false.
Definition: languages.php:56
$args
Some servers don&#39;t allow PHP to check the rewrite, so try via AJAX.
elgg_echo($message_key, array $args=[], $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg_get_available_languages()
Returns an array of available languages.
Definition: languages.php:106
$language
Definition: useradd.php:17
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
Definition: summary.php:55
get_installed_translations($calculate_completeness=false)
Return an array of installed translations as an associative array "two letter code" => "native langua...
Definition: languages.php:68
get_language_completeness($language)
Return the level of completeness for a given language code (compared to english)
Definition: languages.php:79
var elgg
Definition: elgglib.js:4