Project

General

Profile

CdmDataportalMultilingual » History » Version 12

Katja Luther, 04/07/2022 03:22 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
32
--------
33
34 1 Andreas Kohlbecker
Notes on automatic installation of translations:
35 2 Andreas Kohlbecker
36 1 Andreas Kohlbecker
~~~
37
The translations can be named as $langcode.po or with names ending with $langcode.po.
38
39
Translations are only automatically imported during the installation of the module for
40
all the languages already set up on the site,
41
see https://api.drupal.org/api/drupal/includes!locale.inc/function/locale_batch_by_component/8.x for details.
42
43
If the module is already enabled you need to disable and re-enable it. Alternatively you can use the following drush command:
44
45 5 Andreas Kohlbecker
drush php-eval "locale_system_update(array('yourmodule_name'));drush_backend_batch_process();"
46 1 Andreas Kohlbecker
~~~
47
48 6 Andreas Kohlbecker
### 2) Multilingual menus
49 1 Andreas Kohlbecker
50 6 Andreas Kohlbecker
...
51
52 1 Andreas Kohlbecker
### 3) Download and install Drupal-Core Translations
53 7 Andreas Kohlbecker
54
* go to https://localize.drupal.org/download and download the Drual 7 translation package for desired language
55 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"