- Views: Replace the "Current row language" option on the "Translations" tab with the "Current Interface language" etc.
- Install MYPROFILE with any modules
- Enable additional languages (non English)
- Go to the Translation UI (
/admin/config/regional/translate
) and add translations for strings - Go to the Configuration Translations page (
/admin/config/regional/config-translation
) and add translations for configuration settings forms (this can - be also done for each form on the form page "translations" tab). - When ready, export all po files for each language and add this under
mymodule/translations/mymodule.de.po
. The translation pathtranslations/mymodule.de.po
is set onmymodule.info.yml
. Alternatively, use a pot file (template) to generate po translations. Example on https://MY-ONLINE-REPOSITORY/MYPROFILE-platform/-/tree/master/web/modules/custom/MY_CUSTOM_MODULE/translations - When ready, export all config yml files and copy all the files under
config/sync/language
folders under your module/themeconfig/install/language
folder. See example on https://MY-ONLINE-REPOSITORY/MYPROFILE-platform/-/tree/master/web/modules/custom/MY_CUSTOM_MODULE/config/install/language - Data should be translated with CSV import or through the UI (menu link items, custom content blocks, nodes, taxonomy terms etc)
Type | Configuration | twig templates | module strings | drupal entities |
---|---|---|---|---|
source | po, yml | po | po | csv |
where | yml: Inside install/language/LANG folder, po: Inside translations folder |
Inside translations folder |
Inside translations folder |
Inside custom migration module(s) |
Translation server, service | yes (only po, potx files) | yes | yes | no |
- Export (group of) translations to po, csv, xliff, yml, xlsx. mo, REST
- Import (group of) translations from po etc
- Sync (update)
- Clean/remove translations in bulk with options
- Export translation templates (potx)
- Translations reports and status (overview page)
- On page translations (popup style, in-place editor etc)
- Translations suggestions (fuzzy)
- Translations User accounts with Roles
- Save translations data to a database (id, source, target, context, suggestion, author, tags, comment, status)
- Merge translations
- Override translations by context (eg for another module)
- SEO valid
- Option to NOT translate the backend for each installed language (?)
- locale.api.php
- hook_locale_translation_projects_alter
- config_translation.api.php
- hook_config_translation_info_alter
- Internationalization
- locale.compare.inc
- Translation (class)
# Installs profile in DE language only
drush si MYPROFILE --locale de -y
# Install profile in en
drush si MYPROFILE -y
# Default locale commands
drush locale:check, locale:update, locale:export, locale:import
# Example, import a po file from a local folder
drush locale:import de PATH_TO_DE_PO_FILE
drush locale:import nl modules/custom/MY_CUSTOM_MODULE/translations/MY_CUSTOM_MODULE.nl.po
drush cget system.site
drush config:set language.negotiation url.prefixes.el el
- config_import_locale
- config_translation_access
- config_translation_po
- decoupled_interface_translations
- interface_string_stats
- l10n_client
- l10n_quick_links
- l10n_tools
- l10n_update_bundled
- locale_override
- locale_trans_file
- locale_translation_context
- mfd
- multilingual_audit
- po_translations_report
- potion
- potx
- simple_entity_translations
- simple_tmgmt
- string_translation_ui
- tmgmt
- tmgmt_spreadsheet
- tranc
- translate_set
- translate_side_by_side
- translate_tool
- translate_tool
- translated_config
- translation_extractor
- translation_form
- views_entity_translations_links
- yaml_translation_import
The basic columns needed when translating using a Sheet (e.g. Google Sheets),
- location (where us the string coming from)
- source (the string to translate, always in English)
- target (the translated string)
- suggestion (fuzzy)
- context (a special key to distinct this translation from similar)
- comments
- updated (date)
- author (latest)
A. Translate
Translator → Google Sheets (xls) → csv → po (for non Entities) (OR)
Translator → l10n_server (or Service) → translate (manually or through the service API) → export to po file
B. Import to Projects
po → "/translations/PROJECT.LANGCODE.po" file each project root (git)
- localize.drupal.org (official Drupal localize server)
- drupal.org/project/l10n_server
- localizejs.com (translation service, on the fly translation through DOM)
- poeditor.com (translation service)
- poedit.net (translation service)
- weblate.org (translation service)
- mlocati.github.io/jsgettext (Online convert from/to po, pot, mo)
- Configuration language being overwritten during module install (2905295)
- Translated Config Override should default to original language values if there are no translations (2993984)
- Add string context and location filters to the translate interface (2123543)
- Regression: not possible to delete source strings in Drupal 8 interface translation (2503893)
- META: Modernize Locale module (3215707)
- drupal.org/docs/8/api/translation-api/overview
- drupal.org/community/contributor-guide/reference-information/localize-drupal-org/working-with-offline/po-and
- drupal.org/docs/7/multilingual/translating-site-interfaces/contribute-a-translation-to-localizedrupalorg
- api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Language%21language.api.php/group/i18n
- api.drupal.org/api/drupal/core!modules!locale!locale.api.php/group/interface_translation_properties/8.2.x