Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

How to Create a Multilingual Website in Joomla 4

Introduction

Today, English has become a global language and is one of the most popular languages ​​on the internet. A large number of websites are created that prioritize or pay attention to posting content in English. However, not everyone can read and understand English. Having websites that support multiple languages ​​opens up great opportunities to reach a wider audience, especially in the regions you’re looking to target. In fact, content administrators around the world have been doing this for years, and the demand for multilingual websites is increasing day by day. Fortunately, Joomla is one of the content management platforms that supports the most languages and is available in 75+. Therefore, building a multilingual website is also much easier with this platform.

If you were skeptical about the ease, I can ensure, starting a Joomla multilingual website is easier than you could imagine, simpler than it might sound. Let’s see!

Today, in this tutorial, I will show you how to create a multilingual website in Joomla 4. This way, you don’t have to use any third-party extensions, and of course, it’s completely free.

Now let’s go!

How to Create a Multilingual Website in Joomla 4

Follow along step by step to completely set up a multilingual website in Joomla 4.

Installing New Languages

In Joomla 4, there are two methods you can use to install languages.

  • Install via Joomla Update

From the Home Dashboard, go to System, then under Install, click Languages to access the Extensions: Languages page.

Here, click the Install button on the languages you wish to install. You can install as many languages as you want.

Joomla 4 - Multilingual Website - Install Languages

  • Install Manually

With this method, you first need to download language packages from Joomla Community Portal.

Then, go to System > Install > Extensions, upload your ZIP packages and install your languages.

After that, navigate to System > Manage > Content Languages and enable (publish) your languages.

* Notice: You can update/change language info by clicking on each language’s title and modifying its options, e.g. Titles, Language Tag, Flag Image, etc.

Joomla 4 - Multilingual Website - Enable Content Language

Enabling System – Language plugins

Now, we’ve completed installing new languages and published them for content. For the next step, we need to enable the language filter and language code plugins. This helps Joomla filter the content and show them based on the language you choose.

Navigate to System > Manage > Plugins, then search for “System – Language”.

Here, Joomla will display System – Language Filter and System – Language Code in the search result. Enable them both.

Joomla 4 - Multilingual Website - Language Filter

Adding Multilingual Content

Now that you have multiple languages ready on your website. You can use them to generate multilingual content. But first, let’s create new categories and new articles.

  • Create a new category for each language
  • Create new articles in each language.

Add New Category

Let’s create separate categories for each language!

  • Go to Content > Categories > Add New
  • Give your new category a title
  • Select a language from the drop-down
  • Click Save & Close to complete
  • Repeat the same steps for other languages

Joomla 4 - Multilingual Website - Articles Category

Add New Articles

After the above steps, let’s add new articles for each language to create different language content.

  • Go to Content > Articles > Add New
  • Provide a title for your new article
  • Choose a language for the article from the drop-down
  • Compose/update your content
  • Click Save & Close when you’re done
  • Repeat the same steps for your other languages

Joomla 4 - Multilingual Website - Articles

Creating Multilingual Menus

Now you need to assign categories and articles on the Joomla menu. It will allow them to display on the front end. To do that, create each menu for each of your languages.

From the Home Dashboard, navigate to Menus > Manage > Add New. Enter a title and select a menu type, then repeat for the other languages.

Add Menu Items

The new menus which you’ve just created above are still empty. We need to go ahead and add new menu items for each of the menus.

Joomla 4 - Multilingual Website - Menu Item - Home EN

  • Go to Menus > Main Menu EN and add new items
  • Choose a language from the drop-down
  • Click Save & Close
  • Repeat the above steps for the other languages

Joomla 4 - Multilingual Website - Menu Item - Main Menu FR

Right now, inside each main menu item, you need to set a default menu (e.g. Main Menu EN), for when you click on the Home menu item that will become the default Home item for English pages.

Add New Modules

In order to display a menu item on the website’s front-end, you must add a module for the menu item and indicate an exact position. Navigate to Menus > Manage, select a menu and assign it to a module, or go to Content > Site Modules to get started.

For detailed instructions on how to create a menu and then assign it to a module, please refer to this article.

Joomla 4 - Multilingual Website - Modules

Multilingual Associations

General speaking, this enables you to perform translating contents (articles, menus, etc.) from one language to another when you hit the language switcher. Make sure the Associations option is enabled by navigating to System > Manage > Extensions, search for “System – Language Filter” and check if the Item Associations option is toggled on (Yes).

Menu Associations

When adding a new menu item and assign it a language, you can find the options for “Associations” in the “As Associations” tab that it will show. You can also select different menu items for different languages. The same goes for modules, articles, and/or other content items.

Joomla 4 - Multilingual Website - Menu Item - Edit - Associations

Multilingual Associations

Navigate to Components > Multilingual Associations:

Joomla 4 - Multilingual Website - Multilingual Associations

Here are some main options of the components:

  • Articles — You can select this filter to provide all the articles/categories of a language with associations.
  • Contacts — lists contacts for language associations.
  • Menu items — With this option, you can associate languages for all your menu items.
  • Newsfeeds — Helps translate feeds if you’re using the Joomla newsfeed component

Setting Default Page for Each Language

Now we’re going to define the home page for each language. This is one of the most important steps that need to be done.

  • Navigate to Menus > Home EN
  • Click on the star icon (Set as Home) to set it as the default
  • It will then be changed to the English (en-GB) flag to indicate that this is the default page for the Home EN menu
  • Repeat for the other default languages

Joomla 4 - Multilingual Website - Menu Item - Home EN - Set Default

As for the French or whatever language you have:

Joomla 4 - Multilingual Website - Menus - Main Menu FR

Duplicating Template

With the different languages you have installed on your website, there must be a specific template for each one of them. Simply duplicate your default template and name them accordingly for each language.

Create Template Style for Each Language

  • Go to System > Site Template Styles (under Templates)
  • Select your current default template style, then click the Duplicate button at the top
  • Rename the duplicated template for the EN language (for English language pages only)

Joomla 4 - Multilingual Website - Template Styles

Create Navigation Profile for Each Language

Follow these steps:

  • Switch to the Navigation tab.
  • Under Navigation, click the copy icon (as highlighted in the screenshot below) to create a copy of the default profile.
  • Name the clone setting Menu EN.

Joomla 4 - Multilingual Website - Menu EN - Clone

  • Save the Menu EN settings.
  • Now, on the Navigation tab, click the edit icon.
  • Select Megamenu, then choose Main Menu EN for the Select Menu Type field.
  • Save the settings.

Joomla 4 - Multilingual Website - Select Main Menu EN

On the Menu Assignment tab, select only English language menu items => Save!

Repeat the above steps for the other languages.

Creating Language Switcher Module

Now comes the final step!

A language switcher is a mechanism that allows site visitors to switch between languages anytime they want. By creating a language switcher module, you are going to feature a useful way for the visitors to easily view the content in their desired language.

  • Navigate to Content > Site Modules.
  • Click the New button in the upper left.
  • Select Language Switcher as the module type.
  • Give your new module a title.
  • Assign a module position matching in with your template (choose from the drop-down)
  • Enable the Use Dropdown option if you want your language switcher as a drop-down menu.
  • Finally, click Save & Close to save the switcher and make it ready for use.

Joomla 4 - Multilingual Website - Modules - Language Switcher

After that, you can now check the results on the front end.

Phew! You’ve successfully created a fully functional multilingual website in Joomla 4. Congrats!

Wrap-Up

So I just showed you a straightforward approach to build a multilingual website in Joomla 4. Hope you enjoyed the article. Don’t hesitate to leave us your comments should you have any questions. Besides, check out our awesome Joomla 4 templates to get your own responsive, high-performance, and SEO-optimized websites. Thanks for reading, and stay tuned for future how-tos!

5/5 - (2 votes)

The post How to Create a Multilingual Website in Joomla 4 appeared first on LTHEME.

Enregistrer un commentaire

0 Commentaires