Any way to recommend locale to users based on location?

My site is primarily English but occasionally we get Japanese visitors. Discourse is a powerful tool when it comes to language accessibility, however I’ve seen it happen many times where users don’t know that they can change their language locale.

It involves a pretty complex sequence of actions. For example, on mobile:

  • open the avatar sidebar
  • press user icon
  • press cog icon labeled in English as “Preferences”
  • scroll right to view the 7th setting with a computer screen icon labeled “Interface”
  • scroll down to the 4th setting labeled “Interface language”

Now, if you didn’t know English but knew this setting existed you could probably stumble your way to it but I think even then it would be tricky.

I like the idea in the Header Locale Selector but you need an account to see it (is it even possible to change the locale for anonymous visitors?) and it also takes up very valuable header space for a setting that is expected to be used 0-1 times per user across their lifetime.

So my question is whether anyone has a clever way to prompt new users (and ideally anonymous users) to change their language settings especially if they are pinging out from a location that is is not an English dominant country?

see the interface in the locale they selected in their browser when you enable set locale from accept language header

5 Likes

Ok this is 100% what I was hoping for, thank you!

Very strange that it’s off by default :thinking:

1 Like

I think that’s because allow user locale is off by default too.

2 Likes

Which also makes no sense to me. It’s a choice to make the site less usable and accessible to a subset of users for no discerable reason (at least, no discernable reason I can see).

If it was on by default there would be no cost to any user that can read the dominant language and also a benefit to any user that has English (in the case of my forum) as a second language.

It’s the equivalent of a colour setting that by default makes the website black and white for a small subset of users and is on by default.

I think customizing your site is a lot more work when you allow users to choose their locale. When you edit, for example, the welcome message without allowing other locales, you change one text. When you allow other locales, you have to change it for all locales separately, and when you forget that, not all users will get the same information in the message. It’s the same for theme components like the search banner or welcome link banner. When you look at the international section of Discourse Discover, you can see screenshots with a banner using the default “Welcome to our community” text. When I visited those forums, I noticed many of them did customize the banner text, but they didn’t do it for all locales. So while I see the customized text because the theme component doesn’t offer a default German text, someone with their browser’s language set to English (US) sees the default text, which is what happens when the screenshots are taken. So at the moment this might only affect users with English US as their browser language and it is not that much work to translate this as well. But when English UK is added to the component admins would have to change those stings too and then someone could add German and the next text has to be edited. So you not only have go be aware that you have to change the string for different locale, you also have to notice when new locales are added to customize them.
Allowing other locale can cause a lot more work for admins. In a community where people only communicate in one language, it’s probably not worth the effort. The users have to deal with the language anyway. Only an interface in their language is of little use.

4 Likes

I think your examples are implementation choices that don’t have to be that way. For example, there is a default locale on every instance. If it’s important that every user get the exact same information, then for every piece of text, check if the default language text is overriden. If it is, and the user locale is not overriden then show the text in the default locale.

Or alternatively, don’t do that at all. Leave it as is. The default text in every language is (or should be) designed to be really good. Not all users get the fully customized experience, a couple of the elements on screen might be unhelpful. But the alternative is having 100% of the elements be unreadable and unhelpful.

In both cases, the admin really only needs to do as much extra work as they want to. If you aren’t fluent in the default locale, then every single piece of text that is translated for you is a net positive.

I think it’s a shame that so much effort is put into making Discourse thoroughly and deeply multilingual but the default settings will probably make most sites exclusively unilingual. It also means that Discourse as a software misses the opportunity to show itself off as a rich multilingual platform to potential adopters because I’d hazard a guess that the majority of instances are exclusively English. It’s an accessibility issue in my opinion.

I completely disagree. I’ve had a user from South America extremely grateful when I showed him the option to change the UI locale. It definitely improved his experience. Another user visited from Japan and explained how he was intimidated to post on an English site and had a very difficult time uploading an image. He kept hitting reply before the upload finished. I checked and noticed that his locale was on English and that motivated this thread in the first place.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.