3

Initial Problem 2014 - Joomla 3.3.3

I have set up a multilingual site, but rather using the Featured Articles menu-item as Home, I used a Single Article menu-item. Menu-items, categories, articles are all associated among the languages.

If I use the home menu-item from the main menu, it works fine.

The issue is that mod_languages generates duplicate URL for the home pages, when I am in the home page and want to change language.

So instead of going to "www.mysite.com/en" - it goes to "www.mysite.com/en/home". So, currently there are 2 obvious duplicate urls for all my home pages.


Update 2017 - Joomla 3.7x

This is a continuation of this old issue.

That issue seems to be fixed now in recent Joomla versions. Creating associations among the Languages homepage articles is working as expected - (this is tested and confirmed with Joomla 3.7.2).


Update 2017 Joomla 3.7x with Home Page using Articles and sh404SEF issues

However, I had to deal with a very similar issue today, on a multilingual site that had Articles for the homepages that were associated and also it is using sh404SEF.

With the above configuration, some issues appeared:

  • sh404SEF created duplicate URLs for some of the homepages - both a www.example.com/lang and a www.example.com/lang/article-alias URLs may be created for the homepage of each language.

  • It was not possible to switch back to the main language of the website, as for some reason the link in the mod_languages for the homepage main language was like www.example.com/lang/home-alias which was redirecting back to the homepage of the current language.

0

2 Answers 2

1

I have a similar setup, but I used the featured articles function. It works if you create 3 menu items.

Menu item #1: Your "master" home menu, that one is the feature articles item. Stick it in a hidden menu so no one sees the menu at all appearing anywhere. Set it so it's the default Home item (has the star marked on it).

Then make 2 articles, one for each home article in their respective languages and assign them to the language. Set them BOTH to featured.

Menu item #2 Create an English menu and create an english Home menu item and link to just the english home article. Set the language for this item to English. Click the Home icon for this menu and it SHOULD assign a country flag to it instead of a star.

Menu item #3 Create a menu for the other language, and again, make a Home item for that and link to that home article. Set the language for this item to the other language. Click the Home icon for this menu and it SHOULD assign a country flag to it instead of a star.

Then for each menu item in the two different language menus, you can assign the alternate language item that goes with it (so that if a user clicks the flag icon it flips to the other article without giving an error).

The trick is that first "master" home item. Again, you never actually see the featured function (that I can tell), instead you see the home in each of the two other menus.

No idea if this is a help or not what you were looking for, but it works perfectly on a site I built:

http://shoresofgrace.com

3
  • Using Featured articles as home menu-item does not create the issue with the duplicate URL I described. The issue occurs, when using single article for the home menus, which I think it should also be possible.
    – FFrewin
    Commented Aug 30, 2014 at 8:10
  • Following the documentation, I assumed that there's a right and a wrong way to do it, so I just did it how they said to do it: using Featured Articles. Is there a reason you don't want to set it up that way? Are you using one and only one article (not one for each) for both language home pages?
    – Brian Peat
    Commented Aug 30, 2014 at 14:16
  • Well, I wouldn't expect that there could be such restriction of what menu-item someone should choose to use for the home page of a ML site. Although even a Featured item can be configured to display like a Single item, there should not be just the only way to set-it up. At the end it is just the way the current mod_language is designed to fetch/generate the items links...
    – FFrewin
    Commented Aug 30, 2014 at 14:44
1

Initial 2014 Solution - Older Joomla 3x versions

The issue comes from the mod_languages, because currently it will always check for the component's associations and if it finds them, it will create that url for the page. Although in this case, we might just wanted to use only the association from the menu items for homes and skip the component's associations (I am not that sure that this should always work for each case and every home page setup though).

The easiest way to overcome this, is to un-associate those articles that are used by the home-page menuitems, so the mod_languages will just use the menu-items associations.


Resolving Joomla 3.7x with Home Page using Articles and sh404SEF issues

Initially sh404SEF was giving me those issues. Un-associating the articles initially gives a solution for the URLs created with sh404SEF on the language switcher module.

However, if you are like me and like to keep things organized, then likely you will want to have also the homepage articles associated.

In order to fix those, I created manual SEF URLs for the homepage articles in sh404SEF component, that were the simply the URL Language Codes for each language.

So for the Main English language - I changed the URL that sh404SEF was creating with the article's alias, to /en. This worked well even with the setting to remove the default language URL code in the language filter plugin.

Note:

That if the URL for home-page article is set manually in sh404SEF you may have issues if at some point you decide to change the URL Language Code - as they won't be the same anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.