diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-09 09:52:40 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-09-09 09:52:40 +0000 |
commit | 4285be51bdc8213d24d78b0261a52553d560685c (patch) | |
tree | fd00a2b6d4dba879b09b52e8255af191f66398a6 /engine/lib | |
parent | 794f9041e48d863c539e203a1103b4090d2aace2 (diff) | |
download | elgg-4285be51bdc8213d24d78b0261a52553d560685c.tar.gz elgg-4285be51bdc8213d24d78b0261a52553d560685c.tar.bz2 |
Some language helper tools.
git-svn-id: https://code.elgg.org/elgg/trunk@2066 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/languages.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/engine/lib/languages.php b/engine/lib/languages.php index 93ea5d09b..353e9fc35 100644 --- a/engine/lib/languages.php +++ b/engine/lib/languages.php @@ -130,6 +130,26 @@ return round(($lang / $en) * 100, 2); } + + /** + * Return the translation keys missing from a given language. + */ + function get_missing_language_keys($language) + { + global $CONFIG; + + $missing = array(); + + foreach ($CONFIG->translations['en'] as $k => $v) + { + if (!isset($CONFIG->translations[$language][$k])) $missing[] = $k; + } + + if (count($missing)) + return $missing; + + return false; + } register_translations(dirname(dirname(dirname(__FILE__))) . "/languages/");
|