Multilingual set up of the Data Portal¶
- Table of contents
- Multilingual set up of the Data Portal
Providing translations in an additional language for the dataportal module¶
see #5911
Configuration of Dataportal drupal site for multilanguage support¶
1) Install the required modules¶
see #5913 for further details, with the following command the modules are downloaded and installed (first download and then install would be drush dl ... and afterwards drush en ...)
drush -l {site-url} en languageicons i18n i18n_menu i18n_node i18n_string i18n_translation i18n_variable l10n_update
Afterwards the modules should be available in the dataportal where they can be activated:
and the additional language needs to be added:
Home » Administration » Configuration » Regional and language » Languages
-> Add Language
Define which language should be the default language.
The files (for example cdm_dataportal.es-po) for translations can be found in portal code under modul/cdm_dataportal/translations/
In this folder there is also a note on automatic installation of translations (README):
The translations can be named as $langcode.po or with names ending with $langcode.po. Translations are only automatically imported during the installation of the module for all the languages already set up on the site, see https://api.drupal.org/api/drupal/includes!locale.inc/function/locale_batch_by_component/8.x for details. If the module is already enabled you need to disable and re-enable it. Alternatively you can use the following drush command: drush php-eval "locale_system_update(array('yourmodule_name'));drush_backend_batch_process();"
2) Multilingual menus¶
...
3) Download and install Drupal-Core translations¶
- go to https://localize.drupal.org/download and download the Drual 7 translation package for desired language
- Import the language via the settings page at
admin/config/regional/translate/import
. Make sure you have selected the correct target language before clicking on "Import"
Updated by Andreas Müller over 1 year ago · 15 revisions