by Andrew Brett Watson
Ok. You did a new install of Joomla, installed the language packs and created some menu items and content and yet with the language selector module does not display any flags or drop-down menu. Fret not, the answer is easy:
I assume you have already installed the correct language packs. This tutorial is aimed at those who install the language packs but can't see the language selector flags (even though they published the language selection module), so make sure the language packs are installed for all languages before you start.
Before I tell you how to get your flags to appear in the Joomla language selector, let's start with the obvious. Your have the module in a position that is visible on your template right? It is also published right? To check, click on the module for the language selector in the Module Manager (Joomla administrator backend) make sure:
1) Status = Published
2) The Position box in the module configuration uses a position that exits (and is visible) in your template. To make sure, click the "select position" button and up the top where there is a drop down menu called "- Select template -". Click the down arrow and choose the template that your site is using (if unsure which, go to "Extensions>Template Manger in the Joomla Administrator backend)
But you've done that already and still can't see the flags right?
Ok. The problem is that it is a bit confusing the way joomla does the multi language dance. Rather thanå tell you what went wrong, or how Joomla works, I'll simply show what to do to get the language selector to show the drop-down or flags. Hopefully everything will be clearer after you have set up your Joomla install correctly for multi language.
Step One. A "main menu" for each language.
You already have a Main Menu right? Make another menu (not inside main menu, but at the base - we call this "root"- level).
Give this new menu the name of one of your languages.
Repeat this until you have a menu item for all of the languages you want on your site.
It should look something like this:
Step two add a menu item for a default page inside each of the menus you just created.
1) Click on one of the menus you created.
2) Add a menu item and make sure: Default Page = Yes and set the language to the same as the menu item you are inside. Like this:
If all goes well you flag for that language will now appear.
If you get and error that it did not save because "you can't have more than one default page", this is probably be because you did not click on one of the new menu items you created. Make sure to put it inside the right language menu.
It might help to see the menu structure, which should be like this:
---- Content with languages set to "all"
Language (a) Menu
---- Menu item set to language (a) and with Default Page = Yes
Language (b) Menu
---- Menu item set to language (b) and with Default Page = Yes
Basically if you do not have some default content for a language, Joomla will not show the flags in the language selector.
So to recap. To get your flags to show in the language selector all you have to do is:
1) Create root menus for each language
2) Create a menu item inside each of those with the language set correctly and default pages set to "yes".