Yireo - Extensions, tutorials and blog for Magento and Joomla!

Blog Tags

MageBridge Standard

Multilingual options in Joomla! 1.6

Saturday, 22 May 2010

It's premature to already write a blog on Joomla! 1.6 multilinguality while 1.6 is still in its beta-stage. But here it is anyway. If you would check the nightly build of Joomla! 1.6, you can see that translating content is part of its functionality. Let's take a closer look at what's already there.

Difference between language-support and language-support

joomla16_multilingual_3It's always a bit hard to explain: Joomla! 1.5 already supports multiple languages, but it does not allow for content to be translated - while that's actually the functionality want when setting up a multilingual site. Joomla! 1.5 allows you to translate the system language (by means of a language pack) which means you can setup your site to use either English or German - but not both.

To fill in this gap, third party extensions like JoomFish and Nooku Content were created. But the community has asked already for a long time for multilingual support in the core. While ACLs seem to be the biggest improvement of 1.6, multilingual support is a good second.

Installing a language pack

To initialize a language in Joomla! 1.6, the procedure is the same as in Joomla! 1.5: You just install the right language pack through the Extension Manager. We installed a Dutch language-pack for the frontend ourselves.

joomla16_multilingual_1

Because this is stilla beta, the installation was not complete: No entry was added to the MySQL table jos_languages, but this only took a manual database query.

System - Language Filter

The trick of switching between languages is based on the URL. When you access a Joomla! page the URL indicates which language should be used. For example, the following URL points to the French homepage:

http://JOOMLA/fr/home

For this to work, SEF must be enabled. But another requirement is that the new System - Language Filter plugin is enabled. This plugin interprets basically the language-part of the URL (fr) while the SEF plugin still interprets the rest (home).

joomla16_multilingual_4

Language Switcher

Another vital part is the Language Switcher module: If we place this module somewhere on the frontend (let's module position left) it allows us to easily switch languages by clicking on the corresponding flag.

joomla16_multilingual_5

Translating content

joomla16_multilingual_2After adding the language to Joomla!, the next step is to translate content. For Menu-Items, modules, articles, categories - so actually all content - you have the option to select a Language. While the 1.6 demo-content has set all items on the default All, you can easily select a specific language.

This allows you to maintain multiple articles with the same title in different languages. So far so good, but this principle does not work with Menu-Items because Joomla! requires these Menu-Items to be unique. Take for instance the Menu-Item that creates the English homepage:

http://JOOMLA/en/home

If we want a Dutch translation of this homepage, we would need to create a new Menu-Item for the Dutch homepage. But intuitively we would choose the same title (Home) with the same alias (home). This doesn't work, so you need a new Menu-Item with a different title and a different name:

http://JOOMLA/nl/thuis

Build it twice

This actually shows one of the major shortcomings of the current Joomla! 1.6 support for languages: It requires you to build the entire site twice if you want everything translated. Instead of one set of Menu-Items with multiple translations, you get multiple sets of Menu-Items. This will give you some extra work.

You can choose to add an article in one language (French, German) or all languages (All). So if content does not need to be translated, this is flexible enough. But if you choose to add a German translation, you need to add that translation but also reconfigure the original to be English and not All.

Forget about JoomFish and Nooku?

While the core functionality is there in 1.6, Joomla! still has a long way to go before multilinguality is actually part of its core features. Users want multilinguality to be easy to manage and very user friendly. Looking at Nooku and Joom!Fish, all the current effort goes into making the functionality more friendly, while Joomla! 1.6 has only just implemented the basic functionality. But hey, this is a beta and it's already awsome that this functionality will appear in Joomla! 1.6. Stay tuned.

Tags: nooku

About Yireo

Yireo tries to help webdevelopers build successful Joomla! and Magento sites.

More about Yireo