aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/languages.php20
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/");