Skip to content

locale:import

Imports to a gettext translation file.

Examples

  • drush locale-import nl drupal-8.4.2.nl.po. Import the Dutch drupal core translation.
  • drush locale-import nl custom-translations.po --type=customized --override=all. Import customized Dutch translations and override any existing translation.

Arguments

  • --langcode. The language code of the imported translations.
  • --file. Path and file name of the gettext file.

Options

  • --type[=TYPE]. The type of translations to be imported, Options: - customized: Treat imported strings as custom translations. - not-customized: Treat imported strings as not-custom translations. [default: not-customized]
  • --override=OVERRIDE. Whether and how imported strings will override existing translations. Defaults to the Import behavior configured in the admin interface. Options: - none: Don't overwrite existing translations. Only append new translations. - customized: Only override existing customized translations. - not-customized: Only override non-customized translations, customized translations are kept. - all: Override any existing translation.

Aliases

  • locale-import

Legend

  • An argument or option with square brackets is optional.
  • Any default value is listed at end of arg/option description.
  • An ellipsis indicates that an argument accepts multiple values separated by a space.