syl has developed a proof-of-concept plugin for Discourse that allows multiple localized versions of post content. The plugin uses [lang=xx] blocks to define translations. However, it lacks the ability to localize topic titles.
syl requests help from the Discourse team to localize topic titles by defining a language order and allowing users to write titles with multiple languages. Falco and angus suggest handling titles server-side in Rails, using custom topic fields and serializers to send the selected language title.
angus is also working on a separate multilingual plugin that allows translations of tags, category names, and descriptions, and suggests combining forces. jadenfreude requests support for decorating Discourse pages (FAQ/Guidelines, TOS, Privacy Policy), but notes that rewriting the plugin to use decorateWidget() might be necessary. syl agrees that decorating static pages would be a nice feature, but is unsure if decorateWidget has a hook into static pages.
Did you consider handling titles in Rails? Default language is the existing one, while additional titles are custom topic fields. Then you change serializers to send the selected language title in the payload.
Hello! I love this plugin and how simple it is and I feel that it’d be more useful if it supported decorating discourse pages (FAQ/Guidelines, TOS, Privacy Policy) since the headings get translated anyways. I’ve tried forking and expanding on it myself, but to tell you the truth I’m an absolute novice. Although I have a feeling that it needs to be rewritten around decorateWidget() instead of decorateCooked().
Decorating a Discourse static page (FAQ/Guidelines, TOS, Privacy Policy) would be a nice feature. However, I’m not sure decorateWidget has a hook into static pages. Someone, any hint on this?