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