Create a Joomla multilanguage website

Somewhere in the past I read that making a Joomla multilanguage website, is not something for the faint of heart. The most tricky part is probably the larger number of necessary steps.

 

 

 

 

 

1. Joomla multilanguage webinar

The following tutorial is based upon Jonathan Neubauer’s Joomla multilanguage 2.5 webinar. All credits should go to him! You can also follow Jonathan on Twitter. Basically, transforming an existing Joomla website into a Joomla multilanguage website is nothing more than duplicating your content (categories, articles, menus, menu items, modules) and assigning all this to a separate language.

 

The starting point for our Joomla multilanguage website

In this tutorial we’ll start from an existing Joomla 2.5 website, but you can easily follow along if you’re in a situation where you want to start from a blank Joomla 2.5 website. We’ll assume English to be the default language that’s used on the website. Just as in the webinar, we’ll transform this into a Joomla multilanguage website, with French as our second language. Of course, you can use your own languages and add as much of them as you want.

 

Important notice before starting this tutorial

One final word. When following the steps exactly as mentioned, you don’t have to bother about which screen to open or what extra settings to make. Action is only required if something different than the default setting has to be made. For example, when I say ‘Click Save’, be sure not to click ‘Save & Close’. Also disable or clear your cache to be sure no interference will appear. Finally, if you use any SEO plugins (JoomSEF, Sh404SEF, SEOSimple, MijoSEF, …) disable them before starting this tutorial.

 

2. Install the French language pack

Since we want Joomla to generate language specific strings on our site (and even on our backend if we want to), we first have to install the French language pack. (After installation, the new language will appear under Extensions > Language Manager. It shows up both under the tabs Installed – Site and Installed – Administrator.)

  • Navigate to extensions.joomla.org
  • In the search box type French (since that’ll be our second language) and follow the download link
  • Download fr-FR_joomla_lang_full_2.5.7v2.zip (or a more recent language pack if available)
  • Extensions > Extension Manager > Choose File > Click fr-FR_joomla_lang_full_2.5.7v2.zip
  • Click Open
  • Click Upload & Install

 

3. Filter a specific language

By enabling functionality to filter a specific language, we can ask Joomla to discover the language that’s been used in the browser of our visitor. In that way, Joomla will automatically provide the visitor with his preferred language. This is the case whenever there’s a match between the browser settings language of the visitor and one of the languages that’s installed in our Joomla website. If there’s no match, the visitor will be shown the default language.

  • Extensions > Plug-in Manager > click System – Language Filter
  • Status: Enabled
  • Menu associations: Yes
  • Click Save & Close

Menu item associations

When a visitor of your site is looking at your English About page, by switching to the French language (see step 14) Joomla will know that you still want to see the About page, but in French. (If you don’t use menu item associations, Joomla will send the user to the homepage what’s not exactly something we want to happen.)

 

4. Enable dynamically changing the HTML language attribute

Especially when using a Joomla multilanguage website, it is of the utmost importance to always use the correct HTML lang attribute in order to improve your search engine optimization (SEO).

  • Click System – Language Code
  • Is this plugin not showing up?
    • Extensions > Extension Manager > click Discover
    • Click Purge Cache
    • Click Discover
    • (Still not visible? In that case, there’s something structurally wrong with your Joomla installation. You might consider to override the core files with a full Joomla installation pack. Make a backup first before doing this!)
    • Click in the checkbox of the plugin System – Language Code and click install
    • Extensions > Plug-in Manager > Click System – Language Code
  • Status: Enabled
  • Click Save & Close

 

5. Enable French categorisation

In order to assign your content to a specific language, Joomla provides a Language dropdown that you can find almost everywhere. By default there’re only two options available in this dropdown: All and English. Since we’ll use French as our second language, we have to generate an extra option for this language.

  • Extensions > Language Manager > Click Content
  • Click New
  • Title: French
  • Title Native: Français
  • URL Language Code: fr (this will show up in your url like https://cool-tricks.net/fr/)
  • Image Prefix: fr (if you use flag icons to switch to French – see step 14 – this is the Joomla flag icon code that will be used)
  • Language Tag: fr-FR (see column Language Tag on tab Installed – Site or tab Installed – Administrator)
  • Click Save & Close

 

6. Create top level categories for each language

Since we want a Joomla multilanguage website, the amount of content to manage will be a lot more than compared to a single language website. To keep things as simple as possible, the best thing you can do is make root categories for every language. This will simplify things a lot! We first provide a top level English category.

  • Content > Category Manager > Add New Category
  • Title: English (root)
  • Language: English
  • Click Save

 

Now duplicate this category and assign it as the French top level category.

  • Click Save as Copy
  • Title: French (root)
  • Alias: make the input empty
  • Language: French
  • Click Save & Close

 

7. Duplicate the article categories

To make a Joomla 2.5 article available in different languages, you simple need to copy the original article and assign both articles to the correct language and category. First, we copy the current categories to our top level English category. (We explicitly do not ‘move’ them. If we do so Joomla will put all the categories at the first sublevel. As a result, you will lose your entire subcategory hierarchy!) So first, we copy the current categories to our top level English category.

  • In the language dropdown filter click All
  • Click Check All (if you start from a fresh Joomla installation, only the Uncategorised category will be selected)
  • Set Language: English
  • Select Category for Move/Copy: English (root) and click Copy
  • Click Process

 

Now duplicate the article categories to the French top level category.

  • Click Check All (if you start from a fresh Joomla installation, only the Uncategorised category will be selected)
  • Set Language: French
  • Select Category for Move/Copy: French (root) and click Copy
  • Click Process

 

Because we copied the original (All languages) categories instead of moving them, we’ll delete them to avoid any future confusion.

  • Click Check All (if you start from a fresh Joomla installation, only the Uncategorised category will be selected)
  • Click Trash

 

8. Translate the French categories

For the French categories, we’ll have to provide a translated title and delete the alias so Joomla will regenerate one for us.

  • In the language dropdown filter click French
  • Under your top level category French (root), click the first subcategory
  • Title: translate to French
  • Alias: make the input empty
  • Click Save & Close
  • Now repeat these steps for all the other French subcategories

 

 

9. Duplicate the articles

Now that our categories are generated for both languages, we can duplicate the articles and assign them to the correct language and category. First, we assign the current articles to the English language.

  • Click Articles
  • Click Check All
  • Set Language: English
  • Click Process

 

We now duplicate these articles for the French language.

  • Click Check All
  • Set Language: French
  • Select Category for Move/Copy: click French (root) and Copy
  • Click Process


10. Categorise and translate the articles

Since we deleted the original categories in step 6, the articles are no longer associated to them. However, in the listview we can still see the original category of the English articles in the column Category. This will help us to associate each article to their new language category. We first categorise our English articles.

  • In the language dropdown filter click English
  • In column Category, notice & remember the original category
  • Click the first article
  • Category: under English (root) assign the original category
  • Click Save & Close
  • Now repeat these steps for all the other English articles

 

We can now categorise and translate the French articles. We’ll have to provide a translated title and delete the alias so Joomla will regenerate one for us.

  • In the language dropdown filter click – Select Language –
  • Look at the corresponding English article in column Category & remember the original category
  • Click the first listed French article
  • Title: translate to French
  • Alias: make the input empty
  • Category: under French (root) assign the original category
  • Article Text: translate to French
  • Click Save & Close
  • Now repeat these steps for all the other French articles

 

11. Duplicate menu

We need to duplicate our current menu, so menus are available for each one of the installed languages. First, we assign the current menu to the English language.

  • Menus > Menu Manager > click the checkbox of the current menu
  • Click edit
  • Title: English
  • Menu type: english
  • Description: English language menu
  • Click Save & Close


Now create the French menu.
  • Click New
  • Title: French
  • Menu type: french
  • Description: French language menu
  • Click Save & Close

 

12. Duplicate menu items

Since we created a separate menu for each language, we need to duplicate our menu items as well. By default, the current menu items are set to the language All. First, assign them to the English menu.

  • Click Menu Items
  • Click Check All
  • Set Language: English
  • Click Process

 

Now duplicate the menu items and assign them to the French menu.

  • Click Check All
  • Set Language: French
  • Select Menu or Parent for Move/Copy: French Add to this menu and click Copy
  • Click Process

 

13. Menu items language localisation

We have to make sure that each menu item has the correct language settings. We first take a look at our English menu items. For most of them, nothing has to be done. However, be aware of fields where you have to assign you menu item to one or more categories. For example, this is the case for menu items of type Featured Articles.

  • Click the first menu item
  • If present:
    • Select Categories: select one or more appropriate categories
    • Choose a category: select an appropriate category
    • Select a Top Level Category: select an appropriate category
  • Click Save & Close
  • Now repeat these steps for all the other English menu items

 

Now have a look at your French menu items.

  • In the first dropdown filter click French
  • To set the French homepage look in the column Home and click the appropriate star
  • Click the first menu item
  • Menu Title: translate to French
  • Alias: make the input empty
  • If present:
    • Select Categories: select one or more appropriate categories
    • Choose a category: select an appropriate category
    • Select a Top Level Category: select an appropriate category
    • Select Article: select an appropriate article
  • Menu Item Associations: In the English dropdown click the corresponding English Menu Item
  • Click Save & Close
  • Now repeat these steps for all the other French subcategories

Same Menu Title / Alias as in the English menu?

Notice that you can use the same Menu Title and Alias for the French menu, since Joomla knows that each alias will reside under a different language. Therefore, the alias will be unique although having the same name. So you can use a French menu item labelled ‘Tutorials’, even if there’s already such a menu item in the English menu.

 

14. Duplicate the menu placeholders

Now that the menus and menu items are generated for both languages, we need a menu module to publish them on the site. We first assign the English menu to the current menu module.
  • Extensions > Module Manager > click your current menu
  • Title: English menu
  • Language: English
  • Module Assignment: to clear all checkboxes click No pages
  • Module Assignment: Only on the pages selected
  • On the English tab below check all boxes
  • Select Menu: English
  • Click Save

 

Now duplicate this menu module and assign it to the French menu.
  • Click Save as Copy
  • Title: French menu
  • Status: Published
  • Language: French
  • Module Assignment: to clear all checkboxes click No pages
  • Module Assignment: Only on the pages selected
  • On the French tab below check all boxes
  • Select Menu: French
  • Click Save & Close

 

15. A language switcher module

We want to provide our visitors a way so they can switch to another language. To accomplish this, we’re going to publish the language switcher module. This module uses a dropdown to switch languages, but you can also use little clickable icon flags.

  • Click New
  • Click Language Switcher
  • Title: Language Switcher
  • Position: select the position where you want the icon flags to show up on the page
  • Click Save & Close

 

16. Other modules

Have a quick look at your published modules. Are there some of these modules that need to be duplicated as well, or can you use one module for both languages? For instance, you need only one Search module to search your website. However, as we already saw you need two menu’s because every language needs a separate menu.

 


 

17. Install the administrator Joomla multilanguage status module (optional)

Still having problems with your Joomla multilanguage website? For those situations Joomla provides a built-in tool to help you trace issues with your multilanguage settings. Once installed, the administrator multilanguage status module will shop up in the backend of your Joomla website, between the Messages icon and View Site. Guidelines will be shown if there are any problems wit the Joomla multilanguage settings.

  • Extensions > Module Manager > Select the dropdown Site and click Administrator
  • Click New
  • Click Multilanguage Status
  • Title: Multilanguage Status
  • Position: status (this works fine for the default Joomla Bluestork Administrator Template)
  • Click Save & Close

Default homepages for all your menus

Make sure that all your menus have a default homepage selected (a yelllow star or a flag). If not, the Joomla Multilanguage Status module will notice this and give you appropriate feedback.

 

18. Remove URL language code (optional)

By default, your Joomla multilanguage website has the following URL structure.

  • cool-tricks.net/en/
  • cool-tricks.net/fr/

However, for your default website language you can remove the language code if you want to. Suppose we have English set as our default website language. In that case, we now have the following URL structure:

  • cool-tricks.net/
  • cool-tricks.net/fr/

Even when you type cool-tricks.net/en or cool-tricks.net/en/ Joomla will automatically forward this to the shorter and much more elegant cool-tricks.net/.

  • Extensions > Plug-in Manager > System – Language Filter
  • Remove URL Language Code: Yes
  • Click Save & Close

 

19. Language code overrides (optional)

As you know, some languages are spoken in different parts of the world which is the case for US English and UK English. The same counts for French that is used in France and Canada. If you installed the fr-FR language pack (which is primarily used in France) but want to target your website to Canada, you might have an SEO problem. To work around this, Joomla provides language code overrides.

  • Extensions > Plug-in Manager > click System – Language Code
  • fr-FR: fr-CA
  • Click Save & Close

 

Language tag naming convention in Joomla 
[xx-XX] - [ISO 639 language code]-[ISO 3166 country code]

Some popular language tags
bg-BG - Bulgarian / BULGARIA
da-DK - Danish / DENMARK
de-DE - German / GERMANY
el-GR - Greek / GREECE
en-GB - English / UNITED KINGDOM
en-US - English / UNITED STATES
fi-FI - Finnish / FINLAND
it-IT - Italian / ITALY
fr-CA - French / CANADA
fr-FR - French / FRANCE
ja-JA - Japanese / JAPAN
nl-NL - Dutch / NETHERLANDS
no-NO - Norwegian / NORWAY
ru-RU - Russian / RUSSIAN FEDERATION
sv-SV - Swedish / SWEDEN

 

20. Text string language overrides (optional)

By installing a language pack, you enable Joomla to automatically generate custom language messages. For instance if you use the Read more button on your blog page, Joomla will put the words ‘Read more’ into this button. If you have installed the French language pack, Joomla will dynamically put the appropriate French translation into this button. If for some reason you don’t like the default messages that Joomla generates, you can search for the appropriate language string and override them with your own text string. Suppose you want to replace the default value that is used for a Joomla read more button (Read more…), with something else (Read the full story).

  • Extensions > Language Manager > Overrides
  • Select the dropdown and click English (United Kingdom) – Site
  • Click New
  • In the search box, type read more
  • Click Search
  • In the Search Results, click COM_CONTENT_READ_MORE_TITLE
  • Text: Read the full story
  • Click Save & Close

 

 

21. Conclusion

Basically, making your Joomla multilanguage website is nothing more than copy/pasting your content, activating the correct extensions and making some settings in order for all the urls to work as they should.You could also go for the alternative scenario, where you install different Joomla websites on different subdomains (en.domain.com, fr.domain.com, …). However, this is definitely not the way to go, since you’re making a lof of overhead. Managing separate websites can become a cumbersome task. Think about subscribers management, backups, the missed opportunities of not being able to use menu associations and so on.
It's only fair to share...Share on Facebook
Facebook
0Share on Google+
Google+
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

19 Comments

  1. Kay · October 8, 2012 Reply

    Good Work 🙂 I did not try it out but it seems very elaborated.

  2. Al · January 26, 2013 Reply

    Hey thanks a million for your detailed post. I have just finished the process and it’s working perfectly. A tip for people using RocketTheme templates is that you need assign a template copy for language installed, which allows you to load the language specific menus. This became apparent when I tried to complete step 13 but couldn’t find the menu module.
    Thanks again 🙂

  3. Imre · January 28, 2013 Reply

    Hey Al, I’m glad to hear the post was helpful to you 🙂
    And btw, thanks for dropping your tip on the RocketTheme template!

  4. kri othman · February 1, 2013 Reply

    I’m so happy I found this one! All the other tuts insisted that you start with a BLANK Joomla, which I could not figure out why.

  5. Imre · February 1, 2013 Reply

    Thx Kri! It’s a pleasure… 🙂

  6. Tom · March 26, 2013 Reply

    Wow. Nice totally simple and clear tutorial. I have understand at the first reading. Thanks for your work!

  7. Hari · May 2, 2013 Reply

    I tried in my local host everything is working f9 but the content of article is not changing it remain same i m not getting for what these problem occur.

  8. Imre · May 4, 2013 Reply

    Hey Hari

    I can think of three possible causes, with the first being an incorrect setting of your article(s). The other one might be a wrong setting of your menu item(s). The third cause can be a caching issue.

    1. Article
    – Go to Content > Article Manager
    – In the list click the article of the language that doesn’t show up
    – In the field ‘Language’, did you choose the correct language?

    2. Menu
    – Go to Menus
    – You should see a country flag for every language you use on your frontend website
    – Click the country flag for the article that isn’t changed as you said in your post. (If a French article is expected but doesn’t show up, then click the menu item with the French language flag)
    – In the current list click the menu item where you want the translated article to appear
    – Is the correct language chosen in the field ‘Language’? (French in this example)
    – On the right, go to ‘Menu Item Associations’.
    – Did you choose the correct translated article next to the dropdown? (English in this example)

    3. Caching
    Also check that you did not enable a caching system. If you made a correction in Joomla while caching is enabled, it’s always possible that you’re still seeing the old situation. Also clear the cache of your browser for the same reason.

    Remark that the above advice counts for Joomla 2.5. Extra settings can be necessary if you’re using Joomla 3!

    • Hari · May 6, 2013 Reply

      Hi Imre,
      I gone through every point you mentioned above but still stuck to the same thing as before.

  9. Imre · May 7, 2013 Reply

    Hey Hari

    Can you put your local webfolder together with a dump of your database file in a zip, and upload it to Dropbox or something similar? You can use the contact form to send me the private link, so I can download the package.

    It’s intriguing and I’d like to know what’s causing all the trouble here… 🙂

  10. SEBLOd - Bes · May 29, 2013 Reply

    Thanks for your article.
    A good solution to manage a domain name per languages is to used SEBLOD multisites features. It’s done for that!

    It allows to manage only one Joomla multi-language website but with one domain for each language.
    Example: http://www.octopoos.fr and http://www.octopoos.com

    Regards.

  11. Ali · August 12, 2013 Reply

    hi!!
    could u tell me how to change the name of website in two languages.

  12. Imre · August 13, 2013 Reply

    Hey Ali

    You’re probably talking about the required field Site Name that you can find by navigating to Administration > Site > Global Configuration. Interesting question, though I’m not aware of this being possible in Joomla 2.5.

    As an alternative, on the same page you can go to SEO Settings > Include Site Name in Page Titles > and select no. Because Joomla won’t show the site name any longer, in theory you’re free to give a page any name you want by changing the Title of your articles. However, this is not a waterproof solution because there’s always a chance that other things will change too, like for example your menu items.

    Perhaps somebody else has a better solution for this?

  13. Zulima · September 11, 2013 Reply

    I am so glad I found this tutorial. Thank you very very much.

  14. Borhan · September 25, 2013 Reply

    I found configuring a site for using multilingual is often tricky. For little mistake it may not work and its difficult to find what you have made wrong. Recently I found a book that helped me a lot. You may also read that to get your site done right.

    You can get the book ‘Build a Multilingual Website using Joomla! 2.5’ at https://leanpub.com/joomla-multilingual-website (for Kindle, epub or PDF) or at http://www.amazon.com/Build-Multilingual-Website-Joomla-ebook/dp/B00F67BU6K/ (for Kindle).

  15. Claudiu · March 12, 2014 Reply

    Hi and thanks for this accurate explanation. Yet I have a small problem to solve. When I created the site at that time I used only one language (Romanian) for the content of the articles but on the English-UK website language. Now I am trying to add English content in the first instance but the language switcher doesn’t seem to work (when I press the English version the Romanian content is displayed in either case). How do I switch them? I created three menus: Menu-All, English menu, Romanian menu; I created menu items for each language. So now I have: Menu-All with English-UK site language and Ro content, English menu with English language and content, Romanian menu with the menu items and articles copied from the Menu-All. Am I missing something?

    Thanks

  16. Erika Mena · April 19, 2014 Reply

    Hi, I’ve been following step by step but it seems like the site doesn’t load. What could be the problem here? Please help, I’m kind of stuck here.

  17. Ajmal · May 2, 2014 Reply

    Great work, thanks.

  18. handmade oil painting · April 24, 2015 Reply

    example:my urls is xxx.com/en/
    How to change the multi-language seo url to xxx.com/en/. and only do this with default language! do you have any good ideas?

Leave a Reply