Reader small image

You're reading from  Joomla! 3 Beginner's Guide Second Edition

Product typeBook
Published inJul 2014
Reading LevelBeginner
Publisher
ISBN-139781783981502
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Eric Tiggeler
Eric Tiggeler
author image
Eric Tiggeler

Eric Tiggeler has authored several books on Joomla!, such as the highly successful Joomla! 2.5 Beginner's Guide  and Joomla! 3 Beginner's Guide, both by Packt Publishing. He has also written several Joomla! guides in Dutch. His books have received excellent reader reviews. He also writes tutorials for several computer magazines and Joomla! community websites. Over the last ten years, he has developed numerous websites, big and small, using Joomla!. He is fascinated by the Web as a powerful, creative, and ever-changing means of communication, as well as by the revolutionary software Joomla!, which enables anybody to create beautiful and user-friendly websites. On a daily basis, he works as a consultant and copywriter at a communication consultancy company affiliated to the Free University of Amsterdam. Over the last few years, he has written more than 20 books in Dutch on writing and communication. His passion lies in making complex things easy to understand. He is married, has two daughters, and lives and works in Hilversum, the Netherlands. On the Web, you'll find him at www.joomla.erictiggeler.nl(in Dutch) and www.joomm.net(in English).
Read more about Eric Tiggeler

Right arrow

Creating a new site with multilingual capabilities


In this example, let's assume you want to have a bilingual site. The default site should be in English. For users speaking another language, there should be a language switch that will give them access to the same content in a different language. In this case, we'll use Dutch as the second site language, but that's just for demonstration purposes. You can follow along with the steps mentioned in this section using any extra language(s).

Installing Joomla! with multilingual support

When you choose the appropriate settings in the installation wizard, Joomla will automatically create an empty site with multilingual capabilities. After the installation, you'll have separate home pages for as many languages as you choose, different menus for each language, and a language switcher to enable the visitor to select their preferred site language. Joomla will also create one content category for each installed language (which are the containers where you'll place the content for each language) and one article containing dummy content for each category. The result is a great base to start building your own multilingual site. Let's see how this works.

First, install Joomla by following the steps described in Chapter 2, Getting Joomla! Up and Running. You can follow the procedure up to the Finalisation screen (as described in the section Time for action – running the Joomla! installation wizard). From there on, you need to make the following specific choices:

  1. In the Finalisation screen, make sure you don't install any sample data. Select None in the Install Sample Data field, as shown in the following screenshot:

  2. Continue the installation wizard till the final screen. Here, you are prompted to remove the installation folder. However, you should not click on the Remove installation folder button at the top, as this will end the installation with just one site language installed. Instead, click on the Extra steps: Install languages button you find in the bottom half of the screen, as shown in the following screenshot:

  3. Clicking on the Extra steps: Install languages button will take you to the Install Language packages screen. Here, you can choose the languages you need on your multilingual site. This is shown in the following screenshot. The English language has already been installed, as this is the default language pack of the international Joomla version when it is downloaded from http://www.joomla.org.

    Note

    The default English language pack is English (United Kingdom). If you need to use another English language pack, such as English (United States), you can install this separately.

    In our case, we only need to select one additional language. In this example, scroll down until you see Dutch (Netherlands) and select this language. This is shown in the following screenshot:

  4. Install this language by clicking on the Next button. After the selected language has been downloaded and added, you're taken to the second screen with the tab reading Choose default language, as shown in the following screenshot:

  5. In the previous screen, the first option under the Multilingual heading is Activate the multilingual feature. For this option, select Yes. Now, the following extra options are displayed:

    • Install localised content: For this option, select Yes. This way, Joomla will automatically create a content category for each installed language and one dummy article in each category.

    • Enable the language code plugin: For this option, select Yes. This is helpful for search engine optimization, as this plugin adds the ability to use the appropriate language code in the HTML pages that Joomla generates.

  6. In the Default Administrator language and Default Site language sections of this page, select the default language for the Joomla backend and frontend. In this example, we'll leave this set to English (United Kingdom).

  7. Finally, click on the Next button. You're taken to the final screen of the installation wizard. It states which languages you've installed. Now, click on the Remove installation folder button to proceed. This is shown in the following screenshot:

Exploring the frontend of the new multilingual site

By installing Joomla with its multilingual capabilities enabled, you've created a site that's mostly empty, but it does contain a few crucial extras. Point your browser to the newly installed site. It looks like the following screenshot:

You'll notice that the site contains one dummy article on the home page and the Main menu (with just one link) for the content in the default language. In the top-right corner of the screen, you'll notice little flag icons. The flags are displayed through Joomla's language switcher module, and they enable the visitor to switch to the translated version of the site. In this example, clicking on the Dutch flag takes us to the Dutch site. This is shown in the following screenshot:

As you can see, now the Dutch home page is displayed. It also contains one article (called Startpagina, which is Dutch for home page). Apart from the article itself, the article details are also in the Dutch language. The Main menu, which contains just one link, is now in Dutch.

Exploring the backend of the new multilingual site

Log in to the backend of the website (by entering the site URL followed by /administrator) to see what's different in this multilingual installation of Joomla. One example is the Menus submenu, where there are three different versions of the site's main menu. This is shown in the following screenshot:

As shown in the previous screenshot, the Main Menu button with the little home icon is the base menu. This isn't populated with menu links as it's needed for the site to function properly. Apart from this, there are two localized menus, one for the Dutch content and one for the English content.

Each of the menus contain one link of the Featured Articles menu item type; these links point to the localized versions of the home page. To see the properties of this menu link, navigate to Menus | Main Menu (nl-NL) and click on the Menu Items menu link on the left-hand side of the screen. In our example, it contains one translated home link (called Startpagina in Dutch). This is shown in the following screenshot:

The English version of this menu contains a link to the corresponding page in English, as shown in the following screenshot:

To see what's different about the articles in this multilingual site, open one of the dummy articles for editing. Notice that in the article details, the Language option is set to the appropriate content language (in this example, Dutch (NL)). This is shown in the following screenshot:

Adding new multilingual content

You've now got a great base to build your own multilingual site. From now on, when you add new articles and menu links to the multilingual site, make sure to assign the appropriate content language. The following are the steps involved:

  1. Create an article in the default language (in this example, English) and a second, translated version (in this example, a Dutch article). Make sure both articles have the appropriate language set in the article details.

  2. Create a menu link in both main menus; one in the English menu, which points to the English article, and one in the Dutch menu, which points to the Dutch article. When creating the menu item, there are two extra settings to take care of:

    • In the menu item details, make sure to select the appropriate language.

    • In the menu link details, there's an Associations tab. This serves to tell Joomla what Dutch article should serve as the translated alternative of a particular English menu item and vice versa. For each menu link, you can create an association with its translated counterpart.

When you add content and menu links this way, Joomla will display a menu link to the new English article in the English menu and a link to the corresponding new Dutch article in the Dutch menu.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Joomla! 3 Beginner's Guide Second Edition
Published in: Jul 2014Publisher: ISBN-13: 9781783981502

Author (1)

author image
Eric Tiggeler

Eric Tiggeler has authored several books on Joomla!, such as the highly successful Joomla! 2.5 Beginner's Guide  and Joomla! 3 Beginner's Guide, both by Packt Publishing. He has also written several Joomla! guides in Dutch. His books have received excellent reader reviews. He also writes tutorials for several computer magazines and Joomla! community websites. Over the last ten years, he has developed numerous websites, big and small, using Joomla!. He is fascinated by the Web as a powerful, creative, and ever-changing means of communication, as well as by the revolutionary software Joomla!, which enables anybody to create beautiful and user-friendly websites. On a daily basis, he works as a consultant and copywriter at a communication consultancy company affiliated to the Free University of Amsterdam. Over the last few years, he has written more than 20 books in Dutch on writing and communication. His passion lies in making complex things easy to understand. He is married, has two daughters, and lives and works in Hilversum, the Netherlands. On the Web, you'll find him at www.joomla.erictiggeler.nl(in Dutch) and www.joomm.net(in English).
Read more about Eric Tiggeler