Language based on browser language not working

General questions regarding the use of languages in Joomla! 3.x.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
ZioRiP
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Aug 02, 2011 6:16 pm

Language based on browser language not working

Post by ZioRiP » Fri May 24, 2019 11:38 am

Hello, I am not sure what I have done wrong.
I have managed multilanguage websites in the past and they always worked.

This time I am trying to do something slightly different where the language is always English, but I have created modules (and loaded all their positions) in articles, so that the module for Italian speakers would have a slightly different content, and so for many othe languages.

I have enabled both language filters.

Set the language filter as per image attached
https://www.dropbox.com/s/u2lkylgdy3wn15u/language.jpg
Then I created the modules per language, all on a custom position, loaded in the same article.
https://www.dropbox.com/s/jk8l6vfhnuij5hw/modules.jpg

I can test with English UK and English US and they work, generating different content, but they don't work on my friend's computers in other languages and I haven't got any clue.
What am I missing?

Thanks in advance :)

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18873
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language based on browser language not working

Post by infograf768 » Fri May 24, 2019 3:24 pm

Please explain your structure as I am not sure what you mean with
"This time I am trying to do something slightly different where the language is always English"

To which language are the articles in which you load the modules tagged to?
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ZioRiP
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Aug 02, 2011 6:16 pm

Re: Language based on browser language not working

Post by ZioRiP » Fri May 24, 2019 3:47 pm

The language of the articles is always en-us.

I have created a bunch of modules in different languages though, loaded on a different custom position and added at some point in the article like this:

{loadposition englishuk}
{loadposition englishus}
{loadposition italian}


etc etc.

The weird thing is that from my smartphone in en-uk I see the uk content, and from the computer where the browser is set on en-us, I see the us content.

The other languages, tested by other people, apparently only see the en-us content.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18873
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language based on browser language not working

Post by infograf768 » Sat May 25, 2019 10:40 am

Please post url and a screenshot of the multilingual admin module modal window
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ZioRiP
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Aug 02, 2011 6:16 pm

Re: Language based on browser language not working

Post by ZioRiP » Sat May 25, 2019 10:56 am

Sure, thanks:
https://promisingtrader.com/trading-tut ... eservation

If you scroll right above the anchor that I gave you (above the 'skimmer box') in that precise paragraph you can find the text "mastering the trade'.

Please, find the screenshots below, I have done both article and modules:
https://www.dropbox.com/s/ufnoedmd76poj ... g.PNG?dl=0
https://www.dropbox.com/s/zdzi34do0lt1g ... e.PNG?dl=0

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18873
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language based on browser language not working

Post by infograf768 » Sun May 26, 2019 7:10 am

This does not look at all like a multilingual website Joomla way!
The language switcher is not displayed which means one cannot switch languages.

Also I asked you to post the screenshot of the admin multilingual status module.
I.e.
Screen Shot 2019-05-26 at 08.57.29.png
To do this, go to administrator/index.php?option=com_modules filter by administrator and publish the "Multilingual Status" in position "status"
Then click at bottom left of the page to display the module in its modal window.
Screen Shot 2019-05-26 at 09.07.57.png
You do not have the required permissions to view the files attached to this post.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ZioRiP
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Aug 02, 2011 6:16 pm

Re: Language based on browser language not working

Post by ZioRiP » Sun May 26, 2019 7:40 am

I see.
This is not a multilingual website, the content is not in other languages, all I need is that the single modules in a specific language are displayed if the browser language is one that I have a module for.
Is that not possible?
I don't know how wise it would be for me to create a duplicate content in English for all the languages available just for a couple of links in the page. It would not be French if the page is in English but contains the French link to where the relevant thing could be found in France or Canada.

Sorry if I didn't understand your original question, I must have read too quickly because I replied from work.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18873
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Language based on browser language not working

Post by infograf768 » Sun May 26, 2019 8:31 am

This is not a multilingual website, the content is not in other languages, all I need is that the single modules in a specific language are displayed if the browser language is one that I have a module for.
Is that not possible?
Impossible indeed with monolingual Joomla core: tagging a module to a specific content language will just be ignored, whatever the browser settings.

But There are other ways you could try with js and css
Google will help you.
https://www.google.com/search?client=fi ... e+settings

For example
https://stackoverflow.com/questions/498 ... r-language
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

ZioRiP
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Aug 02, 2011 6:16 pm

Re: Language based on browser language not working

Post by ZioRiP » Sun May 26, 2019 8:51 am

Thanks for the hint, I will definitely do it :)

ZioRiP
Joomla! Apprentice
Joomla! Apprentice
Posts: 39
Joined: Tue Aug 02, 2011 6:16 pm

Re: Language based on browser language not working

Post by ZioRiP » Sun May 26, 2019 11:10 am

I never thought of developing this thing by myself (I am trying not to for this project), but at this point I would go for geolocation, ip and ultimately if no information can be retrieved, for browser language.
Thanks, it should not bee too difficult :)


Post Reply

Return to “Language - Joomla! 3.x”