Setting up a Multilingual site in Joomla 4

Introduction

As from Joomla 4.3.4 setting up a multilanguage version of Joomla has been made even simpler.  A click on a link sets up all the required multilingual items.  Further it also generates examples of multilingual menus and content.

The ablity to add extra languages to Joomla has been available for a long time.  Obviously when viewing content such as articles in a particular language one does not wish to see the articles from other languages mixed up in the list.  And of course there needs to be a simple way for users to dynamically select the relevant language.  Again most sites are public so language selection cannot require being logged in.

To meet these needs a multilingual site needs a menu for each language.  Also for content each language needs a matching article category, and each language needs matching articles.  Also the relevant categories and articles need to be associating accross languages.  For example if we have an article Category called 'Articles en français' whose language setting is French and another one called 'Articles in English' then the two article Categories need to be associated.  The same applies to the relevant articles themselves.

Doing this is not difficult but it is very tedious setting up this infrastructure and sometimes challenging getting it right if you are doing this for the first time.

Aditiononally one needs to set up the 'language plugins'.  Again not difficult but easily missed.

But now adding the multilanguage menus, example multilingual categories and multilingual articles, and activating the relevant plugins is available from a button!  This article takes you through the steps of the automation process.

Install Joomla

Joomla is installed in just three simple steps:
1. Select the installation language and the name of the site;
2. setting login data;
3. setting the Database configuration.

These are illustrated in the three images below.
install01install02install03

When done you get a 'Joomla site is ready' message together with the opportunity to install additional languages.

So click on the button additional languages button to start the process.

Note if you are installing on XAMPP or similar then you may get a warning as below about the installation folder:error deleting install folderJust remove the installation folder manually.

install04

Add Additional Languages

After clicking on the button additional languages button a list of all the available languages is shown as illustrated opposite.

Tick the the box,tick box, alongside the required languages.  Then scroll to the bottom of the list and click in the button install selected langs button.

Again on XAMPP you may get a message such as
install later msg.













addlang 01three dotsAaddlang 02


In this example three additional languages were added, giving four in total. This makes the illustration of setting up a multilingual site more realistic.

Arabic wasa choosen as one of the languages because it is a 'right to left' language.

To proceed click on the button open admin button.

If you are installing on XAMPP or similar then you may get a warning as below:error deleting install folder
Just remove the installation folder manually. And click on the button open admin button again.

You will be asked to login
install06

Setup Multilingual site

1. Publish Languages

Go to System and in the Management section select 'content Laguages'.
Publish the new languages by clicking on eachcross unpublished.
languages publish

2.Install Multilingual Sample Data

Select the Home Dashboard and find the Multilingual Sampe Data panel as shown opposite.  Click on Install. Multiling sample data
This then shows a panel such as opposite. So click on the OK button.

This will go through several steps and when done it will return to the Home menu. At the top of the view there will be a message
msg sample data installed
install sample data

3.Content Language Plugins Enabled

To see these go to the System menu and in the Manage section select Plugins. In the Search Bar select 'Language'.  This will show three plugins as illustrated opposite.

Personally I always enable the 'System - Language Code' plugin as it helps to improve SEO but it is not essential.

The 'System - Language Filter' filters the displayed content so that only the current language items are included.

The 'Web Services - Langages' plugin adds language routes to the API for your website.
system lang plugins

4.Menus


A main menu is created for each language as ilustrated opposite.

The relevant menu and its associated module is shown in the front end in the 'side bar right' position.
created menus site

5.Example Categories

The system creates a sample Article Category for each language.

The language is of course set appropriately.

More significantly each article has been Associated with the relevant other language artices.
created article categs

6.Example Articles




Similarly example  multilingual aricles, one for each language, are created.

Again the language has been set and the articles are associatedassociated.
created article examples

7.Language Switcher - Frontend

As part of the multilingual facilites, a language switcher module is created with the default front end location sidebar-right.  This shows the 'flags' of the available languages front end language switcher module.  The current language is English as indicated by the highlighted back ground.  There are several parameters that you can adjust to suit your needs.


The front end will now look something like the image shown opposite.
front end view

ColinM 21 September 2023, modified Feb 2024

Print Email

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.