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 --type=customized nl drupal-8.4.2.nl.po. Import the Dutch drupal core translation. Treat imported strings as custom translations.
  • drush locale-import --override=none nl drupal-8.4.2.nl.po. Import the Dutch drupal core translation. Don't overwrite existing translations. Only append new translations.
  • drush locale-import --override=not-customized nl drupal-8.4.2.nl.po. Import the Dutch drupal core translation. Only override non-customized translations, customized translations are kept.
  • 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. Recognized values: customized, not-customized [default: not-customized]
  • --override=OVERRIDE. Whether and how imported strings will override existing translations. Defaults to the Import behavior configured in the admin interface. Recognized values: none, customized, not-customized, all,
  • --autocreate-language. Create the language in addition to import.

Global Options

  • -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  • -y, --yes. Auto-accept the default for all user prompts. Equivalent to --no-interaction.
  • -l, --uri=URI. A base URL for building links and selecting a multi-site. Defaults to https://default.
  • To see all global options, run drush topic and pick the first choice.

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.