2

I am using Joomla 3.5. All is set up for MultiLanguage. Now I have two articles, one in english the other translated in italian. I would like to have an URL that when is used it will redirect the user to the article in the language of the user browser. SEF is enabled.

I would prefer to not create a menu item for each article I need, but anyway let suppose I have this alias created in menu pointing to the right article:

article-in-english
articolo-in-italiano

SEF URL will be /en/article-in-english and /it/articolo-in-italiano.

What I would like is to have only one link /article-for-all that I could publish and that will redirect to the correct user language automatically. But also pointing to /article-in-english (that has language associations configured) could be ok for me if this could work as a entry point for routing.

Many thanks!

1
  • Well with article-for-all I can't imagine how efficient this could be overall. What I could imagine though, using the default language -say english as the entry point- you could develop a plugin to recognize user language or location and then propose them to visit the associative article (assuming there is one) in their other language or continue in the same page.
    – FFrewin
    Mar 27, 2016 at 10:55

1 Answer 1

2

Joomla router just doesn't work that way.

Only way you could have a link /article-for-all is to create a menu for each article and to manualy set that alias in both menu items, because Search Engines are looking for the XML "lang" and not the language of the alias.

BUT you could try a different approach:

There is a nice little free plugin called Easy Language, for easy and immediate management of multilingual texts in every possible area of Joomla, articles, components, modules, metadata, template, other components (example K2) etc.

The parameter that filters the language is the language code URL. (es www.yoursite.com/en/page).
To use simply insert the following code in the template, editor or any editable field of any component or module:
{lang en}Text english{/lang}
{lang it}Testo italiano{/lang}

So, basically what I'm pointing to is is to have ONE article with menu alias you want, and inside that article to separate English from Italian text by using aforementioned plugin codes. You can use the codes in Article Title too.

Now... I haven't tested this plugin in newest Joomlas and used it before only in J2.5, but you should give it a try.

Hope this helps.

4
  • 1
    Many thanks Mikan, very explicative reply and suggestion. I am still learning Joomla so sometime I need someone who knows the CMS better than me to confirm me that what I am missing does, in fact, not exist. Thanks for your help.
    – Manny
    Mar 29, 2016 at 8:52
  • You're quite welcome @Manny. Just keep working and learning Joomla! She is quite charming, but needs strong hand ;-)
    – Mikan
    Mar 29, 2016 at 8:59
  • Can this answer be updated with latest version of Joomla? Still true? Nov 10, 2020 at 14:23
  • @OlleHärstedt Have no idea tbh... Stopped dealing with Joomla after v3.6
    – Mikan
    Nov 11, 2020 at 15:03

Your Answer

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

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