User-Configurable UI Language/Locale


(Erlend Sogge Heggen) #9

I think this is a really valuable feature, but the majority of forums will not need it, simple as that.

How does Drupal handle this? All I know is WordPress doesn’t support this out-of-the-box either, instead it relies on the de-facto translations plugin WPML, which offers translation features far and wide beyond what could ever be considered reasonable for the WP core.

Don’t you think a plugin might be the more reasonable route here as well? If there’s enough people interested, maybe you could pool some money together and hire a freelancer.


(Ted Strauss) #10

I would like to retract my comment that it should not be hard to implement this multilingual feature. It was a dumb thing to say. I have installed and superficially hacked on Drupal & WP localization plugins to make multilingual sites, but I have no idea how hard it would be to write one from scratch.

Great idea!


(John_Lee) #11

I’m not sure exactly how its done but you dont need a plugin with wp if your theme has .po .mo files which you can edit into any language


(Nate Finch) #12

Let me throw in my +1 for multilingual sites. Every year it’s a more and more international world. Assuming everyone that wants to use the same site speaks the same language is folly. Even if all the content is in one language, giving non-native speakers a native interface will help them use your site and feel more at home. And that’s not to mention the fact that many sites already have language specific sub-forums. Splitting communities based on language is not a good way to foster community.


(Jeff Atwood) #13

It totally is, though, because we can only understand and communicate with people who speak the same language as us.

Unless we’re communicating only non-verbally, with glyphs and pictures and videos, somehow…


(Ted Strauss) #14

You have made this point before, so I think it’s important to raise a counter-argument, since it goes to the core of ‘civilized discourse’.

There are many civilized multilingual communities. I live in one called Montreal. For two hundred years people from two linguistic cultures have lived together here. They fought a war, one side lost, there has been all kinds of strife, and yet we still live together and have a pretty awesome society and economy.

Misunderstandings and miscommunications are common but the goals of the wider community outweigh by far the difficulties of communicating. Technology like this forum can help overcome those challenges, making it easier for linguistically mixed communities to figure stuff out.

Faced with a similar use case, Facebook has a translation feature. For the user, it’s a simple and powerful way to cross language barriers. And it recognizes that people want to communicate with people who speak other languages.

Some communities are naturally multilingual. For those communities a multilingual forum is an important feature, so it is an open and valid problem. If this forum isn’t catering to those groups, fine, but please don’t say that the need isn’t there or it isn’t legitimate.


Inline translation of posts into another language
(Joop Kiefte) #15

Mind this is not about the written contents, but just about the ux. The contents on a Canadian site can easily be mixed English/French, but not to be able to switch the ux to your language indicates a level of ignorance… (No, not everybody speaks English!)


(Joop Kiefte) #16

English as a monolingual society is more an exception than a rule. And a lot of people on English-language sites are there not knowing English well, so having the ux in English is a dealbreaker for participation. This is a very important feature!

I have moderated a community that I can imagine using Discourse, the common language being toki pona. I wrote most meta-messages toki pona/english/esperanto, and sometimes french and spanish as well. You cannot expect that e.g. beginners just put up with a complete toki pona or english-only interface on such a forum!


(Nate Finch) #17

That assumes that we all only speak a single language. Many people speak more than one, though usually one much better than the other. It shows respect to non-English speakers to give them the option to see your site with the UX in their native tongue… even if most of the discussions on the site are still in English. It’s more welcoming, and less alienating to people with English as a second language. (using English as shorthand for “site’s main language”)


What languages do you speak, and how well?
(J Phani Mahesh) #19

Thanks for making me google toki pona.


(Dave McClure) #20

thanks for making me google toki pona.


(om_1984) #21

The forums we want to deploy have an English section for common discussions, and Polish, German, Russian sections for discussions in the respective languages.

The transition between the forum sections should be seamless for the user, and likely the Polish users would want to see their UI in Polish, the Germans in German, and so forth - even if they will all write English in the English-language section.

It seems that currently Discourse doesn’t support this (not that uncommon) deployment scenario.


(Jonathan Allard) #22

Indeed, I am a fellow Montréalais trying to implement the Kit for a Canadian federal organization.

Mostly, I see the importance in allowing speakers of either language (French/English in my case) to participate, should they speak only one or both. So for example, a unilingual French person (we have plenty here in Quebec!) would be able to contribute seamlessly to topics in French. And vice-versa.

There’s also a political side to this: it would be a bit insulting (or patronizing) for example to foster discussion in French for French speakers, on a bilingual Discourse, with the interface only in English.

I think we can all agree on principle that in the best of worlds, we’d have this feature.

That said, I’d be interested to pitch in and start work towards a pull request/plugin to implement this. Has this process been started? If not, I’ll volunteer a fork!

@sam, you say this would be fairly complex to implement and I believe you. I’m not completely familiar with Discourse’s architecture, would you give us the gist of doing such a feature? I’m just looking for a few bullet points of the technical challenges and rough roadmap of implementing this.

Would you dev folks see this more as a main repo patch, or a plugin? I’d appreciate any advice on this!


(Jeff Atwood) #23

Thanks for the effort! Unfortunately this (and by this I mean per-user language toggle, on top of the per-site language toggles we already have) is such a large, invasive, breaking feature change across the surface of the server and client that we would have to effectively stop all other feature work for a period of weeks or months to implement it. I don’t feel that would be a wise use of the limited venture capital funds we have at this time.


(Erhune) #24

Just wanted to pitch in to say that’s also the Discourse feature I’m waiting for the most.

I’m currently using multi-site to separate my users by language across 2 boards, but that has wasted many opportunities for cross-polination between communities, since many of my users can speak multiple languages, but there is no elegant way to organize content across boards.

I’m actually thinking of biting the bullet and forcing all my users on a unique English-UI Discourse (with maybe a few dual-language translations for stuff like the common “Reply” buttons), with categories per language for organizing the content, since I think I “lose” more my not properly enabling the multi-language speakers to give their best than by giving the one-language-only speakers a UI in their native language.

@joallard I cannot commit any amount of time, but if you have started to work on your fork, I might be able to give a hand here and there when I have some time. I already contributed some other stuff to the Discourse codebase, so I’m at least a bit familiar with the code (but more on the server-side than the client one, unfortunately).


(Jonathan Allard) #25

I just want to make sure we’re talking about the same thing here. I am not speaking to separating the content of a forum in any way over language. The only thing I would be after is to allow a user to choose their preferred UI language to view the same content. Roughly, I would’ve seen simply some calls to I18n.locale = both on Rails/Ember sides. I just can’t grok what would take “weeks or months” of programming to implement. (If so and you can give me a preview, I would appreciate)

(@erhune I haven’t started anything as @codinghorror’s post did a good job of scaring me :wink:)


(Jeff Atwood) #26

Yep, we’re talking about the same thing. @sam and I have both said this would be complex to implement, and has never, not once, been brought up by any of our partners to date. Or even once in the hundreds of phone and in-person conversations I’ve had about Discourse.

I’m sure in the years ahead we will get to many other things, possibly including this. But it is not in the cards for now. Perhaps you’d like to work on polls? That’s something that actually gets requested all the time.

Just sayin’.


Make a multi-language forum
(Ted Strauss) #27

I’d like to request that this thread be closed @codinghorror , and any new discussion be started in new topics.

The great conversation above makes clear that:

  1. Some users have a strong interest in the interface language toggle feature, that is a requirement for mixed language user communities (e.g. Montrealers).
  2. The project owners have decided that it’s too complicated a feature…
  3. and there’s not enough demand from overall user base, compared with other priorities (e.g. polls).

Those who want this feature, myself included, should get organized and try to implement it. A new thread should be started by anyone who wants to lead in that effort.

It’s going to be tough, and the odds are stacked against us, but we can pull through as long as…

(link … onebox not working!)


User language preference and why is it hard to implement
(Jonathan Allard) #28

I have started work on my fork to put together something that works “alright” (rather than be perfect).

After just dumbly changing set_locale in the application controller,

   def set_locale
-    I18n.locale = SiteSetting.default_locale
+    I18n.locale = if current_user && current_user.locale.present?
+                    current_user.locale
+                  else
+                    SiteSetting.default_locale
+                  end
end

it works well enough that I still don’t get where the “person-weeks” complexity is. (I haven’t seen anyone name an actual reason to explain the complexity, so that might explain my confusion)

I still haven’t figured out how to bring the locale list to the user preference page – meaning the user can’t edit its preference using the UI – so if someone could show me the way, I’d appreciate.


(Sébastien Santoro) #29

An issue we have on MediaWiki for this kind of behavior is the cache. What’s the best strategy to cache resources per language? If we create new cache keys per language, what’s the best way to invalidate them when needed?

(Because, despite what were said upper, MediaWiki allows to personalize the langauge. On Wikipedia, you know have a language selector in the top right bar; on other wikis, you can use ?uselang=de or ?uselang=ja to change the language, and save in the preferences the UI langauges.

We also have a meta. and commons.wikimedia.org as multilingual)

So, how are you offering to handle the caching in your work?

(I’m launching a community site in the next few weeks, and I would like to deploy Discourse. By coincidence, it’s also French/English. Outside Montreal, this requirements exists too, for example for Brussels, to include expats.)