CdmDataportalMultilingual » History » Version 8
Andreas Kohlbecker, 02/25/2020 03:13 PM
1 | 1 | Andreas Kohlbecker | # Multilingual set up of the Data Portal |
---|---|---|---|
2 | |||
3 | 7 | Andreas Kohlbecker | ## Providing translations in an additional language for the dataportal module |
4 | 1 | Andreas Kohlbecker | |
5 | 6 | Andreas Kohlbecker | see #5911 |
6 | 1 | Andreas Kohlbecker | |
7 | 6 | Andreas Kohlbecker | ## Configuration of Dataportal drupal site for multilanguage support |
8 | |||
9 | |||
10 | ### 1) Install the required modules |
||
11 | |||
12 | 5 | Andreas Kohlbecker | see #5913 for further details |
13 | |||
14 | 1 | Andreas Kohlbecker | ~~~ |
15 | 4 | Andreas Kohlbecker | drush -l {site-url} en languageicons i18n i18n_menu i18n_node i18n_string i18n_translation i18n_variable l10n_update |
16 | 1 | Andreas Kohlbecker | ~~~ |
17 | |||
18 | Notes on automatic installation of translations: |
||
19 | 2 | Andreas Kohlbecker | |
20 | 1 | Andreas Kohlbecker | ~~~ |
21 | The translations can be named as $langcode.po or with names ending with $langcode.po. |
||
22 | |||
23 | Translations are only automatically imported during the installation of the module for |
||
24 | all the languages already set up on the site, |
||
25 | see https://api.drupal.org/api/drupal/includes!locale.inc/function/locale_batch_by_component/8.x for details. |
||
26 | |||
27 | If the module is already enabled you need to disable and re-enable it. Alternatively you can use the following drush command: |
||
28 | |||
29 | 5 | Andreas Kohlbecker | drush php-eval "locale_system_update(array('yourmodule_name'));drush_backend_batch_process();" |
30 | 1 | Andreas Kohlbecker | ~~~ |
31 | |||
32 | 6 | Andreas Kohlbecker | ### 2) Multilingual menus |
33 | 1 | Andreas Kohlbecker | |
34 | 6 | Andreas Kohlbecker | ... |
35 | |||
36 | 1 | Andreas Kohlbecker | ### 3) Download and install Drupal-Core Translations |
37 | 7 | Andreas Kohlbecker | |
38 | * go to https://localize.drupal.org/download and download the Drual 7 translation package for desired language |
||
39 | 8 | Andreas Kohlbecker | * 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" |