Posting in the same language as forum's language

AI 生成的摘要

The discussion revolves around automatically blocking posts in languages other than the primary language of a forum on Discourse. azaleas is planning to create two separate forums for different languages and wants to avoid posts in the wrong language. SidV suggests using APIs like Detectlanguage.com or others (e.g., Rosette, Lextek, language-detection, Google Translate) to detect the language of posts, as Discourse does not currently have this feature.

Alternatively, codinghorror proposes using watched words to block or flag posts in the wrong language by adding a common, unique word from the language to be blocked. However, this method may require caution to avoid accidental overlap between languages.

Hi all,

My question is regarding this scenario:

If the forum is in English and all the discussions are made in that particular language, is there a way to automatically block posts in other languages? Like, if a user creates a new topic or posts a reply, there going to be a rule which will check the language of the entry. And if the language is different than English the user will be notified accordingly.

The reason why I’m asking this question is that we are planning on creating two separate forums for two different languages. And we would like to avoid this kind of issue and forward the user to the forum with appropriate language.

I think you must educate your readers.

Or… apply something like Detectlanguage.com API in your forum.
Right now, discourse does not use something like that.

May be, if you post this request into Marketplace some semi-god from ruby could apply it.
I’m not sure.

Regards

Ps, others API’s:

  • http://www.basistech.com/text-analytics/rosette/language-identifier/
  • http://www.lextek.com/langid/
  • https://github.com/shuyo/language-detection/blob/wiki/ProjectHome.md
  • https://cloud.google.com/translate/docs/?csw=1 (google translate API docs)

This is basically possible with watched words today. If you add a common (but unique in character set) word from the language you wish to prevent from posting, you could block or flag posts that seem to be in the “wrong” language.

Just watch out for accidental overlap, which will depend on the language. For example if you’re blocking Chinese from an English forum the character set makes the check virtually guaranteed to be safe and unique.