Elgg\I18n\Translator::getMissingLanguageKeys PHP Method

getMissingLanguageKeys() public method

Return the translation keys missing from a given language, or those that are identical to the english version.
public getMissingLanguageKeys ( string $language ) : mixed
$language string The language
return mixed
    public function getMissingLanguageKeys($language)
    {
        // Ensure that all possible translations are loaded
        $this->reloadAllTranslations();
        $missing = array();
        foreach ($GLOBALS['_ELGG']->translations['en'] as $k => $v) {
            if (!isset($GLOBALS['_ELGG']->translations[$language][$k]) || $GLOBALS['_ELGG']->translations[$language][$k] == $GLOBALS['_ELGG']->translations['en'][$k]) {
                $missing[] = $k;
            }
        }
        if (count($missing)) {
            return $missing;
        }
        return false;
    }