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에는 번역에 대한 일부 지원 기능이 있으며, 이 기능을 기반으로 계속 개발해 나갈 예정입니다.

포럼의 UX는 여러 언어를 지원하며, 사용자는 원하는 로케일을 선택할 수 있습니다. 포럼 운영자가 특정 언어에 전용으로 카테고리를 설정하는 사례를 많이 확인했습니다.

3개의 좋아요

정보 주셔서 감사합니다!

카테고리 설정과 discourse-ai에 대해 조사해 보겠습니다. 의견이 있으면 다시 말씀드릴게요 :blush:

1개의 좋아요

이 문제는 해결되었습니다.匿名用户 캐시 키에 로케일을 추가함으로써 수정되었을 것으로 추정합니다.

set locale from accept language header 설정은 개인 사이트와 공개 사이트 모두에서 안전하게 활성화할 수 있습니다. 이는 OP(원문 작성자)가 요청한 언어 전환기(language switcher) 기능은 충족하지 못하지만, 사이트의 대부분의 신규 사용자에 대해 이 문제를 해결해야 합니다:

allow user locale와 set locale from accept language header 사이트 설정이 활성화되면,匿名用户는 브라우저에 설정된 로케일로 사이트가 제공됩니다. 신규 사용자는 사이트에 가입할 때 로케일이 브라우저 언어로 설정됩니다.

2016년 이후 이 상황이 얼마나 변했는지 궁금합니다. 제 생각에는 기계 번역 기술이 그때 이후로 크게 향상되었습니다.

1개의 좋아요