CdmDataportalMultilingual » History » Version 13
Katja Luther, 04/07/2022 03:23 PM
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 | 11 | Katja Luther | ## Configuration of Dataportal drupal site for multilanguage support |
12 | 6 | Andreas Kohlbecker | |
13 | ### 1) Install the required modules |
||
14 | |||
15 | 10 | Katja Luther | 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 ...) |
16 | 5 | Andreas Kohlbecker | |
17 | 1 | Andreas Kohlbecker | ~~~ |
18 | 4 | Andreas Kohlbecker | drush -l {site-url} en languageicons i18n i18n_menu i18n_node i18n_string i18n_translation i18n_variable l10n_update |
19 | 1 | Andreas Kohlbecker | ~~~ |
20 | 10 | Katja Luther | |
21 | 1 | Andreas Kohlbecker | Afterwards the modules should be available in the dataportal where they can be activated: |
22 | ![](Screenshot 2022-04-07 151821.png) |
||
23 | 11 | Katja Luther | |
24 | and the additional language needs to be added: |
||
25 | |||
26 | Home » Administration » Configuration » Regional and language » Languages |
||
27 | |||
28 | -> Add Language |
||
29 | 1 | Andreas Kohlbecker | |
30 | 12 | Katja Luther | Define which language should be the default language. |
31 | 13 | Katja Luther | ![](Screenshot 2022-04-07 152247.png) |
32 | 12 | Katja Luther | |
33 | -------- |
||
34 | |||
35 | 1 | Andreas Kohlbecker | Notes on automatic installation of translations: |
36 | 2 | Andreas Kohlbecker | |
37 | 1 | Andreas Kohlbecker | ~~~ |
38 | The translations can be named as $langcode.po or with names ending with $langcode.po. |
||
39 | |||
40 | Translations are only automatically imported during the installation of the module for |
||
41 | all the languages already set up on the site, |
||
42 | see https://api.drupal.org/api/drupal/includes!locale.inc/function/locale_batch_by_component/8.x for details. |
||
43 | |||
44 | If the module is already enabled you need to disable and re-enable it. Alternatively you can use the following drush command: |
||
45 | |||
46 | 5 | Andreas Kohlbecker | drush php-eval "locale_system_update(array('yourmodule_name'));drush_backend_batch_process();" |
47 | 1 | Andreas Kohlbecker | ~~~ |
48 | |||
49 | 6 | Andreas Kohlbecker | ### 2) Multilingual menus |
50 | 1 | Andreas Kohlbecker | |
51 | 6 | Andreas Kohlbecker | ... |
52 | |||
53 | 1 | Andreas Kohlbecker | ### 3) Download and install Drupal-Core Translations |
54 | 7 | Andreas Kohlbecker | |
55 | * go to https://localize.drupal.org/download and download the Drual 7 translation package for desired language |
||
56 | 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" |