/** * Move a string from one file to another. * * @param string $p_oldPrefix * @param string $p_newPrefix * @param string $p_key */ public static function ChangeStringPrefix($p_oldPrefix, $p_newPrefix, $p_key) { $languages = Localizer::GetLanguages(); foreach ($languages as $language) { $source = new LocalizerLanguage($p_oldPrefix, $language->getLanguageId()); $source->loadFile(Localizer::GetMode()); $srcValue = $source->getValue($p_key); $target = new LocalizerLanguage($p_newPrefix, $language->getLanguageId()); $target->loadFile(Localizer::GetMode()); $target->addString($p_key, $srcValue); $source->deleteString($p_key); $target->saveFile(Localizer::GetMode()); $source->saveFile(Localizer::GetMode()); } } // fn ChangeStringPrefix