$translation = $entries->find($context, $original, $plural); if ($translation) { $translation->setTranslation($original_translation); if ($plural) { $translation->setPlural($plural); if ($plural_translation) { $translation->setPluralTranslation($plural_translation, 0); } } } } if (!file_exists(dirname($file_with_translations))) { mkdir(dirname($file_with_translations), 0775, true); chmod(dirname($file_with_translations), 0775); } Gettext\Generators\PhpArray::generateFile($entries, $file_with_translations); if ($file_extension == 'js') { Gettext\Generators\Jed::generateFile($entries, 'locale/' . $lang . '/' . $file_to_translate); } ?> <div style="color: green">Saved Successfully</div><?php } ?> <!DOCTYPE html> <h1><?php echo $file_to_translate; ?> </h1> <h4><?php echo $lang; ?>