Custom content localization

AI-generated summary

foloex seeks a method to localize custom content within a single Discourse forum, specifically targeting badge names/descriptions, category details, and tags for English and French users. They note that /admin/customize/site_texts does not currently support these custom elements. gerhard confirms this is not possible at the moment and recategorizes the thread as a feature request. codinghorror suggests localizing by category, mentioning a plugin by @simon that sets locale based on category, and asks erlend_sh for updates. gerhard counters that this plugin does not solve the specific issue of translating custom content like badges. codinghorror proposes running completely independent Discourse sites for each language as the only current solution. foloex rejects this approach, as their goal is to maintain a unified community where speakers of different languages interact. They discovered that the system already attempts to find translation keys for badge descriptions (e.g., translation missing: fr.badges.dummy.long_description) but lacks a form to define them. They hypothesize that /admin/customize/site_texts simply needs an interface to add these new translation strings.

Hello Discourse,

I’m trying to create a multi-languages forum based on Discourse. I’m trying to localize the custom content for the main languages that the forum will handle (english and french at first). I cannot figure out how to make the translation for all the custom content such as badge’s name, short and long descriptions, categories’ name and descriptions, tags …

I saw the topic Customize text in Discourse but was deceived by it’s claim “customize all text”. I’m aware of /admin/customize/site_texts but it doesn’t seem to handle custom content.

Is there a way to do that in Discourse ? Without hacking the forum and loosing everything at the next update ?

That’s not possible at the moment. I’m recategorizing as feature request.

1 « J'aime »

Our suggestion is that you localize by category, e.g. have a Russian, French, etc category.

There is a plugin by @simon which sets the locale based on category that I really want to pull in and make a standard plugin that we support everywhere – we also have customers that need this.

Any news on this @erlend_sh?

3 « J'aime »

But this plugin doesn’t solve the problem of @foloex, does it?

The only “solution” for that is to run completely independent Discourse sites for each language at:

en.discuss.example.com
fr.discuss.example.com
sp.discuss.example.com

etc.

2 « J'aime »

The idea is to have the french and the english speaking talking to each other. if I separate my community I lose all the idea of making this forum.

However, while messing with a dummy badge (called “dummy”) I noticed that if I put ${} variables into the short and the long it of course fails but in a interesting way:
translation missing: fr.badges.dummy.long_description

So I’m just missing a way to create those string as the system is already looking for them. That doesn’t seem to apply to the badge’s name but if I can translate the short and long description that a good start :slight_smile: From what I understand /admin/customize/site_texts is just missing a form where to define new translations.

1 « J'aime »