Skip to main content

How to create a multilingual Joomla4 site

| Gianluca Gabella | Joomla!
share on facebook share on twitter share on linkedin


Troppo testo da leggere?

Today we are tackling a somewhat thorny subject: Joomla multilingualism! Let's find out how to activate this feature and configure it in the best possible way in order to take advantage of Joomla4's native multilingual capabilities.

Although the native system is absolutely integrated into the core (no external plugins are needed) it has always been considered a bit 'cumbersome', in fact over the years third-party extensions have spread to facilitate the work of translation: there used to be Joomfish (for Joomla 1.5 and 2.5) which was replaced a few years ago by Falang, which took the code, improved it and modernised it.

Differences between the integrated system of Joomla4 and Falang

The differences between the two systems are quite marked, I would say conceptual: Joomla's integrated system provides for the creation of a different article for each language (in this guide we will only take the core as an example to avoid unnecessary lengthening), which will then be associated with each other. So, to simplify as much as possible

  • Create the "CATEGORY ITA" category and the "CATEGORY ENG" category
  • Create the article "ITA ARTICLE" and assign it to the "ITA CATEGORY".
  • Create the article "ARTICLE ENG" and assign it to the "CATEGORY ENG" category
  • Associate the two articles with each other so that, by clicking on the classic frontend flag, the user switches from one language to another in the same text

So let's say that the content has doubled. And we are talking about both articles, categories, menu items, etc.

As far as Falang is concerned, on the other hand, the main article remains one: translations are managed internally by the component and do not involve 'manual' doubling. The result is a 'cleaner' site with fewer, apparent redundancies.

What are the pros and cons of the two systems?

Using the integrated Joomla method has one huge pro: it is part of the Joomla core itself. This means that it will always be updated with joomla itself, there will never be compatibility problems and it is obviously free: in case of updates after a long time, you will not need to buy new licences or similar.
The con is that each article is literally duplicated, and this only in the case where there are only two languages. If the site hosts 10 languages, there will be 10 different copies of each article, and this can be confusing (partly solved by clever use of filters in the article list view).

Using Falang makes it much easier to manage translations: each article will have a 'flag' next to it which, when clicked, will open a modal where the translation of the content can be entered. The visualisation is therefore much cleaner and easier to understand by even inexperienced users.
As cons we have those of all third-party extensions: they are developed by people who have nothing to do with the Joomla core and may well stop working at any time. Moreover, the developer must always keep up with the joomla evolution: if Joomla5 is released, he must necessarily update his version otherwise the component risks becoming unusable in a short time. Finally, there are the costs: Falang has a free version, but it lacks several interesting features (such as flags). If you want to update the site regularly, you must also periodically purchase a licence for Falang.

In this guide we will only deal with Joomla4's native multilingualism, for Falang we will do a dedicated guide in the future.

How to install a new Joomla4 multilingual site

When installing Joomla (you can find a guide on how to unpack the ZIP file of a brand new Joomla on your server here) you will be asked if you want to install a clean monolingual Joomla4 or if you already want to install multiple languages. This step is very convenient because it automates some of the initial steps needed to get your site working with multiple languages.

Immediately after completing the initial installation steps (asking about super admin, database, etc.), this screen will appear:

installazione di joomla - scelta multilingua

In case you don't want a multilingual site, that's it: click on "Complete and Open Administrator" and start playing with your brand new Joomla4. In case you want to install one or more additional languages click on "Install Additional Languages >".

This screen will appear:

joomla multilingua - scelta delle lingue

Here you can select the languages you want to install, just check them on the side and then click at the bottom on 'Install selected languages':

joomla multilingua - installa lingue selezionate

ATTENTION: In order to automatically install languages your site must be in HTTPS! If the site is not secure (i.e. in 'normal' http) you will get an error message when you click on 'Install selected languages'.

At this point the Joomla4 installer will ask you which language should be the default in the control panel and which language should be the default in the frontend. They can also be different: for example the control panel will be in Italian while the site will default to English.

joomla multilingua - scelta delle lingue di default

Once we have chosen the default languages we are back to the Joomla installer closing page. Click on "Complete and Open Administrator", this will automatically delete the "installation" folder and you can start working on your new Joomla4:


Installing additional languages on Joomla already configured and started up

If you want to add languages to an already installed Joomla, the steps are very simple:

  • Click on "System" in the left-hand menu
  • Click on "Languages" in the "Install" block
  • Find the desired language and click on the button on the left-hand side "Install".

This will install the language files and create a 'content language', but this will be disabled. To enable it and proceed with multilingualism, you can continue reading directly below.

How to configure the Joomla4 control panel for multilingualism

Well, we are halfway done: the languages are installed but your site is not really multilingual yet (missing flags, etc.). Before you can use the native Joomla4 system you will need to do some additional work.

From the control panel click on "System" in the left-hand column and then in the "Manage" block click on "Content Languages".

Here you will see a list of all the languages that we have previously added but they will be unpublished:

joomla multilingua - lista delle lingue contenuti

Enable all the languages you want in your Joomla4 site: we can enable them one by one by clicking on the grey X (which will become a green tick) or by selecting them with the checkbox and then from the top button click on "Actions" -> "Publish".

Now that all the languages are published we can finally enable multilingualism on our Joomla site.

More specifically, the operations to be done, if your site is already active for some time and already has content, are as follows (but wait to do them if you have a brand new joomla4 site!!!, read below):

  • Enable the 'System - Language Filter' plugin
    To do so, simply go to Control Panel -> Plugins (or from the left-hand menu "System" -> "Manage" -> "Plugins: plugins", search for the plugin and enable it.
    You can leave the options inside as they are, but you can of course customise your choices:

    • Language for new visitors: if you leave it as it is, the site will be displayed in the language you have chosen as default. Otherwise it will be based on the language of the user's browser (if the browser is in English the site will come up in English, if the browser is in Italian the site will come up in Italian, in other languages the default language will be displayed)

  • Enable the 'System - Language code' plugin.
    To do this, follow the same instructions as for the previous plugin.

  • Create a category for each language
  • Create an article for each language (and the various associations)
  • Create a menu for each language
  • Create a homepage for each language
  • Publish the multilingual module for choosing the display language (the classic 'flags')

Automatically install multilingual sample data

Or use the integrated Joomla4 system to do all this automatically!

From the site control panel look for the "Sample Data" block. The second option will be "Multilingual Sample Data", if you click on "Installation" the system will do all the steps above automatically, saving you a lot of time:

joomla multilingua - abilitare plugin e articoli multilingua

How does Joomla4's native multilingualism work?

Having reached this point you already have, technically, a perfectly functioning multilingual site. However, you need to understand the mechanism behind it, because it is not very simple.

Let's go by points, so as to be as clear as possible:

  1. Multilingual content is, in fact, duplicate content
  2. The English version and the Italian version of an article are two separate articles
  3. As are the English and Italian versions of menus, categories, etc.
  4. Articles are linked together by association: this allows us to switch from one language to another when we click on the flags

So let's see what our website will look like after we have installed the multilingual example data:

New article structure:

each article will be set for only one language (in the 'language' column, there will not be the classic 'all' but the flag of the specific language) and the Association column will be visible where, now, the other languages besides the article itself are set.

What is association?

It serves to make the system realise that two articles are basically the same thing, but in two different languages. In this particular case, the 4 articles in the 4 languages are associated with each other, and this is done automatically by the feature that installs the multilingual example data.

joomla multilingua - nuova struttura articoli

New category structure:

Similarly, categories will also be multiplied by the number of languages, and will be associated with each other. This will allow us to have correctly subdivided aritcles according to languages and enable the correct 'blog layout display' of Joomla menus.

categoria multilingua

New menu structure:

Menus also change and multiply:

nuovi menu

There will now be a menu for each language within which there will be a language-specific home. That's right: each language will have its own home:home specifica

The 'Association' column will also be present for the menus, allowing the menus of the various languages to be linked together.

Publishing the Joomla4 native 'flags' module

Last step! Now that we have configured the backend in the best way to take advantage of the multilingual functionality we need to give users the ability to switch from the frontend: this is done by publishing the native Joomla module called "Language Switcher".

You can find it in the left menu -> Content -> Site Modules -> "Language Switcher".

If you have used the automatic multilingual installation feature the module will already be activated and published, and in the frontend it will appear like this:

joomla multilingua - menu bandierine frontend

Within the form options we can set some customisation, for example:

  • "Previous text" and "Next text": if we want to put some words before or after the flags
  • "Use dropdown menu": in case you prefer a dropdown to the 4 links of the flags
  • "Use flag images": if you prefer the classic images or the text format link (e.g. "Italian" or "IT")
  • "Active language": whether or not you also want to display the currently active language (e.g. the Italian flag if you are already in the Italian version of the site)
  • "Horizontal display" if you want the languages in a horizontal row (or vertical otherwise)

OK, everything is set, but how do we proceed now?

The most is done, once the menu and category structure is set up, you just have to generate the articles. So you have a blog and want to write a new article, the steps are as follows:

  1. Create your own article entitled 'ARTICLE ITA' and put it in the category 'CATEGORY ITA'.
  2. Add the English version by creating a new article and calling it 'ENG ARTICLE' which you will place in the category 'ENG CATEGORY'.
  3. Associate the two articles in the 'associations' tab inside one of the two articles:

    joomla multilingua - linguetta associazioni

    Pay attention: this association is to be made only once per language pair. That is, if I associate the article ITALIAN with the article ENGLISH then English is also automatically associated with Italian, I do not have to redo the same operation on both articles.
  4. Create the French version, the German version, etc... and associate the pairs of articles as you did for the Italian/English pair

The end :-) You have created content in 4 languages and associated the articles with each other. If everything is done correctly, you should see the 4 menus we have set up and by clicking on the flags within the article you should be able to switch from one version to the other.

What happens if I do not associate an article with its counterpart?

Legitimate question: if I forget (or don't want to because I don't intend to translate) to associate two articles with each other (so, for example, the Italian and English versions of the same content) then the system will have no way of 'switching' between the Italian and English versions via the 'flags'. Two things will therefore happen:

  1. If I have created a menu item that lists me all the articles in a category:
    1. In the main menu item, my article will appear
    2. In the translated menu item, there will be no translated version of my article. In the list there will be just one article less than in the main language list.
  2. When I am within the single article, the flag link, as it has no association, will redirect to the homepage of the second language.

Creating sites with some content translated and some not can therefore cause some confusion for the user.

But isn't it a bit complicated?

Yes and no. I agree that the system is, at first sight, very cumbersome. One has to enter into the concept of native multilingualism and it is not so simple. For sites with just a few pages, however, it is perfect because it takes relatively little time to set everything up and you are not tied to external components that may be out of date, unsafe, or chargeable.

For particularly large or complex sites (many menus, content, third-party extensions, etc.), however, the situation risks becoming chaotic and degenerating into a quagmire of duplicate content that is impossible to find and maintain. In these cases there is only one answer: FALANG, a component for Joomla 3 and Joomla 4 which greatly simplifies multilingual site management.

We will be back soon for a guide dedicated to Falang: to its installation and configuration.

Amusez-vous bien avec votre logiciel multilingue Joomla !

TLDR? Guarda il video!

If you liked this article, please share it!

share on facebook share on twitter share on linkedin
condividi su Facebookcondividi su Twittercondividi su LinkedIncondividi su WhatsAppcondividi su Telegram