Multilingual Joomla 1.7
If we wanted a multiple languages supported on our site based on Joomla 1.5 we had to install various extensions (JoomFish for example). But from Joomla 1.6 we have a full native support for multiple languages.
To set up a multilingual site has always been a bit tricky - no matter what CMS you are using. We have to maintain multiple versions of the same article, menus, modules and even graphic in template can differ between languages.
When starting to setup a multilingual site in Joomla there are few things you'll have to keep in mind.
- languages setup in language manager
- enable language filter system plugin
- overall home page menu item and menu item for each language
- create a correct site structure
- mod_languages module setup
- assigning proper content languages to items (article, menu, module etc)
Setup languages in language manager
At the bottom of Extensions menu item (administration) you'll find Language manager.
If you want your site to support a language you should install a site language. Then you'll have to create a content language. It's two different things and one can exist without other.
Content language
Fields are pretty self explanatory. Be sure to choose proper URL language code. Joomla will append this string to URL. And be sure to publish it!
Image Prefix is a prefix of the image file for this language. Example: if 'en' is chosen, then the image shall be en.gif. Images and CSS for this module are in media/mod_languages/
Joomla language filter system plugin
Under Extensions->Plug-in manager you'll find System - Language Filter plugin. Enable it! I suggest you set its options. I definitively want to set language selection mode for new users to Site language.
Menus setup
This one is really tricky and important. Things won't work without it and I've spent quite some time to figure it out (found it somewhere on the net :)
Dummy menu
You'll have to create a dummy menu to put an unique default home menu item in. Language parameter of this item should be set to "All". You have to create it but you don't have to display it anywhere (no need for a module to put this menu in).
Separated menu for each language
Now you have to create a menu for each language and put a home menu item for this language in it. Set it as default (Default page = Yes) and set the language parameter to appointed language. When saved you'll see language flag next to it. Be sure to have default items published :)
Site structure for multilingual site
You should create a root categories for each of your languages. Probably you'll want to have them mirrored so that switching will be easier for users.
Whatever you'll do you must follow some rules here. All the sub-categories have to be set to the same language as the parent category is. Internal links in content has to be linked to the content with the same language.
Menu items have to point ONLY to items in the same language as the menu item is. Modules that display these menus should also be appointed to the same language.
"All" is considered as a language and should follow the same rules.
Add a mod_languages module
This module displays a list of available languages- for your visitors to have a way to switch to their language.
Parameters are self explanatory I think so I won't go into details.
If you can't see the module when published, please check if you have enabled plugin and setup a menu system as written above.
Assigning proper content languages to items
When adding content, modules etc you'll have to think about your multilingual site and be careful to select proper language. This is a bit mind-state altering. Specially if you are used to work on sites with only one language enabled.
| Next > |
|---|