Toggle navigation
TechnoWikis.com
Email or Username
Password
Remember
Login
Register
|
I forgot my password
All Activity
Questions
Hot!
Pending
Ask a Question
Privacy Policy
Contact
Multilingual sites with Drupal
Home
Tutorials
Development
CMS
Multilingual sites with Drupal
(adsbygoogle = window.adsbygoogle || []).push({});
+4
votes
268
views
Multilingual sites with Drupal
asked
Jun 24, 2019
in
CMS
by
backtothefuture
(
552k
points)
reopened
Jun 24, 2019
|
268
views
answer
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Add answer
Cancel
1
Answer
+5
votes
Best answer
First of all, if we want our site to be available in several languages, the most logical option is to add more languages ​​and then configure them so they can be detected.
Adding languages
Drupal
by default has the support for languages ​​in its core, but it is not completely activated by default.
Let's see how to activate it.
1-
To integrate the languages ​​with our site, activate the kernel module.
We go to
Configuration
Ã
Regional and Language
to see the following options:
2-
We click on
Languages
and we will see that we only have
English
activated in our list for now:
3-
For our purposes we will work with predefined languages.
Therefore, we choose the language of the list and click on the
Add language
button:
4-
After this
Drupal
will redirect you to the list of main languages ​​and your new language will have already been added to the list, now to add more languages ​​we repeat the previous process, in this example we add:
Arabic, German
and
Polish
.
The above table shows the names of the languages ​​we add, their code, their address, when we talk about address we refer to the way they are read, from left to right or vice versa.
Here we can choose which languages ​​to activate, sort or delete them from the list.
Detecting languages
Now that we have the languages, we realize that if we navigate through our site everything remains the same, because despite having added languages ​​we still need to tell
Drupal
how to interpret them, let's see:
We navigate to
Configuration
Ã
Regional and Language
>
Languages
>
Detection and selection
and we will see the following available options:
URL
If we activate this option, users can browse URLs in the following way: example.com/de/news/ or example / deutsch / news.
This is a common configuration for multilanguage sites.
Session
We will use this option if we want to save the preference of the languages ​​in the user's session.
User
In this option, users can specify in the profile of their account which language is their preference.
Browser
If we activate this option Drupal will verify the language preference of our browser and will use it on our site.
Already described the different options we use one to implement the multilanguage option on our site.
For our purpose, we will keep the URL option and for this we will use the prefix of the route, since it is the simplest way of configuration.
Let's see how we do this:
First we mark in the URL options and press
Save settings
.
Now we click on
Configure
in that method and we will see the options
Path prefix
and
Domain
.
We will use the default option that is
Path prefix
.
Now we change the URL in our browser to include the prefix of the route.
For example, problems
German
, example.com/de.
In this way we can use the prefix for each of the languages ​​we add.
Switching between languages
We certainly do not want users to be manually changing the languages ​​by the URL so we create a block in Drupal so that we place it somewhere on our site to facilitate this task.
To create the block, navigate to
Structure
à Blocks
and look for the user interface block:
Language switcher
.
We position it in the place we want and we save the settings for the block, after activated it would look like this:
For example, we select that our site is in German and our login would look like this:
Drupal gives us the opportunity to not only create robust and versatile websites, but also has the goodness to make the same multilanguage a feature that will stand out on its own from other websites on the network.
answered
Jun 24, 2019
by
stackoverflow
(
3.5m
points)
edited
Jun 24, 2019
ask related question
comment
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Add comment
Cancel
Related questions
+3
votes
1
answer
Installing Drupal under Windows
asked
Jun 23, 2019
in
CMS
by
backtothefuture
(
552k
points)
|
191
views
+4
votes
1
answer
Drupal - Custom types types
asked
Jun 23, 2019
in
CMS
by
backtothefuture
(
552k
points)
|
179
views
+5
votes
1
answer
Best sites with free books in English
asked
Aug 12, 2021
in
Education
by
backtothefuture
(
552k
points)
|
112
views
+4
votes
1
answer
How to set up multilingual text suggestions Windows 10
asked
Oct 2, 2019
in
Windows 10
by
backtothefuture
(
552k
points)
|
229
views
Sponsored articles cost $40 per post. You can contact us via
Feedback
All categories
Tutorials
7.5k
Microsoft
1.9k
Android
1.4k
Security
120
Linux / Unix
543
Internet
757
Virtualization
104
Apple
611
Networks
64
Other Devices
321
Other Applications
184
Hardware
19
Development
53
HTML5 / CSS3
12
Web Servers
9
JavaScript
12
Other languages
2
PHP
8
CMS
4
Python
5
WebServers
1
Digital Marketing
47
Databases
14
Graphic Design
30
Guides
794
GraphicDesign
54
Networking
4
PlayStation
186
Gaming
55
Linux/Unix
85
Manzana
33
Otherdevices
38
Otherapps
49
Digitalmarketing
39
Safety
1
Developing
2
Help
685
Social Networks
34
Android Tutorial
549
iPhone Tutorial
267
News
17
Social
6
Phone
11
Telephone
9
Applications
167
Smartphones
3
Cell Phones
11
Applications
25
Travels
6
Photo
21
Education
18
Games
25
Internet
14
Music
8
Technique
10
Video
6
Windows
5
Apple
2
Cell Phones
3
TikTok
216
Trips
2
House
1
Operating System
5
Tips & Tricks
892
Solutions
6
Tutorials
3
FAQ
1
Applications
5
Cell Phones
2
Tutorials
4
Computers
6
Tutoriales
2
8
Technology
2
In Computers
1
In Applications
2
Tutorials Tutorials
9
Applications Applications
25
Aplicaciones Applications
4
Devices Devices
5
Tutoriales Tutorials
1
Tutorials u00a0 Tutorials
2
Applications u00a0 Applications
2
Devices u00a0 Devices
1
OS OS
1
Etc Etc
2
Most popular questions within the last 30 days
Please leave a comment about whether the solution works or not (with device model)
[X]Close
10,659
questions
10,791
answers
510
comments
3
users