aboutsummaryrefslogtreecommitdiff
path: root/cli/i18n/I18nData.php
diff options
context:
space:
mode:
Diffstat (limited to 'cli/i18n/I18nData.php')
-rw-r--r--cli/i18n/I18nData.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/i18n/I18nData.php b/cli/i18n/I18nData.php
index 5071c9be9..73a731245 100644
--- a/cli/i18n/I18nData.php
+++ b/cli/i18n/I18nData.php
@@ -229,6 +229,25 @@ class I18nData {
$this->ignore[$language][] = $key;
}
+ /**
+ *Ignore all unmodified keys from a language, or reverse it.
+ *
+ * @param string $language
+ * @param boolean $reverse
+ */
+ public function ignore_unmodified($language, $reverse = false) {
+ $my_language = $this->getLanguage($language);
+ foreach ($this->getReferenceLanguage() as $file => $ref_language) {
+ foreach ($ref_language as $key => $ref_value) {
+ if (array_key_exists($key, $my_language[$file])) {
+ if($ref_value == $my_language[$file][$key]) {
+ $this->ignore($key, $language, $reverse);
+ }
+ }
+ }
+ }
+ }
+
public function getLanguage($language) {
return $this->data[$language];
}