Example #1
0
				continue;
			}

			$matches[] = 'STRING_MODEL_' . $modelName . '_' . strtoupper($column);
			$matches[] = 'MESSAGE_MODEL_' . $modelName . '_' . strtoupper($column);
		}
	}
}

// Strip duplicates
$matches = array_unique($matches);

// If this is a component, then load Core's strings so that this script knows which strings are NOT required.
// Anything in Core is assumed to be present already, as that's the basis for every package!
if($configKey != 'core'){
	$fallback = \Core\i18n\I18NLoader::GetFallbackLanguage();
	$file = \Core\Filestore\Factory::File(ROOT_PDIR . 'core/i18n/' . $fallback . '.ini');
	$contents = $file->getContents();

	foreach($matches as $k => $m){
		// For each match, skim through Core's i18n file for this same string.
		// If found, remove from array.
		if(preg_match('/^' . $m . ' = .*/m', $contents) === 1){
			unset($matches[$k]);
		}
	}
}

// Sort them
sort($matches);