Simple idea for translator-assisted bilingual forum

English is an international language.
Everyone who is willing to participating an international discource should speak English at least little.

In the same time, a community launched in a non-English speaking country, has a different language, local to the territory.

This makes me think that bilingual forums are a special case and deserve special attention when compared to multilingual forums (3 and more languages).

… this also fits perfectly my case

We have recently discovered that English-speaking goat farmers have great interest in how Ukrainian goat farmers make cheeses. In the same time, our farmers are interested in professional breeding that English-speaking farmers are good at.

We are now faced with a challenge: keep our forum comfortable for Ukrainian goat farmers (as it always has been), and in the same time make it easy for English people to participate in some bilingual topics for knowledge and experience exchange.


So let me share my thoughts on a possible implementation.

An important note is that this is a professional community, so Google / Bing translations will not work. I experimented auto-translating some topics and it was a disaster. Not only some slang was an issue, but also grammatical errors in key words. This lead us to the idea that we would rather spend some resources on manual translation on the topics of interest only, and keep other topics Ukrainian/Russian only.

We’ve launched an experimental Q/A Session where both sides can ask questions and give answers.

People can write using their own language, while we translate their messages, so every message in this topic is bilingual:

These translations are curated / assisted, give it any name, but the point is that we do not translate automatically. There are some delays, but the quality goes up and the topic promises to be quite interesting. I invited some other users from English-speaking communities to participate, and some of them already expressed real interest in some topics in PMs and wish to participate.

This seems to be an interesting attempt, to start with. But now we need the UI to be improved just a little!

1. Collapsable sections per language

Discourse does already have a plugin to hide/show sections in posts. It would be great if there was a way to optionally assign some locale per section (an attribute in Markdown markup).

  • If no locale assigned, it is always collapsed (the current default behaviour).
  • If locale is assigned but is the only one section with locale in the message, it is expanded by default.
  • If a few sections with locale are present, than only one is expanded by default - the one with the current user locale.
  • In anonymous mode, all sections with locale are expanded by default.
  • If no one section has the same locale as the current user’s one, the one with default website’s locale is expanded only by default.
  • If no user locale matches, nor global setting locale matches, all sections with locales are expanded by default.

2. Add locale class to collapsable sections

.section-locale-ru {...}
.section-locale-en {...}

While on this, add locale class to the body element as well

<body class="user-locale-ru">...</body>

This will allow to apply styles to sections that match current user locale only:

body.user-locale-ru .section-locale-ru {...}

3. Add language switcher in the header

This language switcher would allow to switch to English quickly before even trying to find Signup button. It would also assign the selected default language to user profile. As a workaround, we created a how-to topic to which we link from the original Q/A session topic. However, upon signup, new users receive Ukrainian welcome message, which is not good experience.

4. Make categories and topic names translatable by mods

This is more advanced feature.
As a workaround, we just named the topic in both languages:

(en) Q/A with Ukrainian goat farmers. (рус) Вопрос-ответ с англоязычными козоводами

Result

As a result:

  • users can switch languages easily before registering
  • users will see only sections in their languages expanded, while others collapsed
  • if no translation available, the original section is expanded

The only thing I’m not sure about is how it will affect SEO.


Anyone keen on implementing such a functionality?
I would make it with pleasure on my own, but I’m nowhere near being a ruby programmer.

6 个赞

You have a collection of ideas bundled together here. Separately they may be simple, but together they make for quite the extensive project!

(1) and (2) are definitely plugin territory.

(3) might also be plugin territory, but imo it would be beneficial to figure this one out for core, as I fully agree that it ought to be easier to discover and use our language switcher. @simon will soon be working on some localisation improvements for us. Maybe we can look into this then.

(4) Proper multi-lingual category names & descriptions ought to be in core at some point imo.

Translateable topic names on the other hand is very niche. This is plugin territory.

6 个赞

I’ve been thinking about this use case as well for my community and am keen to do it - in my mind @tgxworld’s in line translation can work for this, if the ability for aithorized users to improve translations were added to the plugin. This way the basic translation is there for languages supported by bing but can be improved if it’s wrong or added in the first place if the language is not supported.

I’m working on a feature that will set the locale for new users based off the accept-language header that is sent by their browser. It should do some of what you are looking for here. It will hopefully make sure that new users on multilingual forums get signed up with the correct locale. Users on multilingual forums will get their emails (including the activation email) in the correct language. This should be ready right away.

I would like to add a locale-switcher to the header for the case of a non-logged-in user whose locale is different than the site’s default locale. This is to deal with the possibility that their locale has been set incorrectly. If this gets the go ahead, it would be easy to add the locale-switcher to the header under other conditions, either through a site setting or a plugin.

4 个赞

Hi Simon! Where are you at with this locale switcher in the header feature? It seems a good idea to me! Esp the bit about anonymous users.

We do registration via wordpress, so perhaps I need to look at prefilling the locale field (which is described as the “preferred interface language”) using the web browser locale. Currently people do not tend to change it because they don’t realize what the benefits are of changing it to their preferred language.

I haven’t made it yet, but I’d like to. What’s been holding me back is that there’s a problem that if the locale is changed for an anonymous user on a forum that is using a CDN, the wrong locale may be served to the next anonymous user on their first request to the forum.

See:

It’s a solvable problem, possibly doing something like this: Swedish? meta just showed me the UI in Swedish - #10 by simon

For sites that aren’t using a CDN, this would be a fairly simple plugin. I think something like this could work as the UI:

Clicking on the ‘globe’ icon would open up a menu-panel that contains a locale switcher similar to the one in the admin section and a button that says something like ‘Reload Locale.’

2 个赞

I think the degree of the problem is being radically undersold here; dealing with language headers for anons makes caching an absolute nightmare. We weren’t able to even brainstorm a way of doing it at all that wasn’t extremely difficult and complex.

1 个赞

Hi, did you ever make any progress on this? I want to do something similar, but with machine translation. I’m wondering if there’s a feature/plugin we can enable for our forum and merge our two forums that are using different languages on the same topics.

您好,我来得有点晚,但我也对(1)这个想法感兴趣:每个语言的可折叠部分。

我的社区背景:用户主要居住在挪威,其中一些人更喜欢阅读挪威语(并不是说他们不会读英语,只是他们更喜欢母语)。因此,对于文档类别中的长篇主题,可折叠的挪威语部分效果最好。
但我浏览了此主题,似乎我们还没有实现(1)这个梦想的方法?

1 个赞

自首次发布以来,我们已经有了许多解决方案:

这允许您快速翻译。

此外,discourse-ai 确实支持一些翻译功能,我们将在此基础上进行扩展。

论坛的用户体验支持多种语言,用户可以选择他们想要的语言环境。我见过许多论坛所有者设置专门针对特定语言的分类。

3 个赞

谢谢你的信息!

我将开始研究类别设置和 discourse-ai。如果有什么想法,我会回来的 :blush:

1 个赞

此问题已解决。我假设它是通过将地区设置添加到匿名缓存键来修复的。

“从 accept language header 设置地区”设置可以安全地在私人和公共站点上启用。这不满足 OP 对语言切换器的要求,但应该能为站点上的大多数新用户解决此问题:

如果启用了“允许用户地区”和“从 accept language header 设置地区”站点设置,匿名用户将以其浏览器设置的地区语言访问站点。新用户在站点上注册时,其地区设置也会被设为其浏览器的语言。

我想知道自 2016 年以来情况发生了多大变化。我的感觉是,机器翻译自那时以来已经有了很大的改进。

1 个赞