In this topic, we will walk you through the Content Localization features and how to enable them. The features are split into two parts: What is available by default in Discourse; and Discourse AI for automatic translations.
For quick access to the relevant sections, use the wiki headings ![]()
Localizing Your Community’s Content
Discourse gives you access to several localization features available for configuration at:
<your-site-url>/admin/site_settings/category/content_localization
Preparation
Firstly, it is good to get some information on your community via data explorer.
Locale via user preferences
The following query can give you an idea of how many users may have set their locale in /my/preferences/interface.
SELECT locale, count(*) as count
FROM users
WHERE (locale IS NOT null AND locale <> '')
GROUP BY locale
ORDER BY count DESC
Where your users are coming from
A better solution, if you have Browser pageview events enabled (site setting), is this query that tells you which country your user is from:
SELECT
e.country_code AS country_code,
COUNT(*) AS pageviews
FROM browser_pageview_events e
WHERE e.country_code IS NOT NULL
AND e.country_code <> ''
GROUP BY e.country_code
ORDER BY pageviews DESC
Setup
With the information above, you are now more informed about which locales your community should support.
In <your-site-url>/admin/site_settings/category/content_localization, start setting this up.
Content localization enabled- turns on the feature that replaces original written user content with localized content. Read on for auto (AI) and manual (human) modes of localizing.Content localization supported locales- the list of languages your site supportsContent localization crawler param- covered in the crawlers section belowContent localization language switcher- covered just below
Language switcher
Enabling the subsequent setting Content localization language switcher also allows you to make your community more accessible to non-logged-in users by showing the list of languages you’ve chosen in the list of supported locales:
Viewing localized content
For viewers of localized content (all site visitors), they may cursor over the indicator next to the post’s date to view the original language of the post. This indicator only shows up if the post is not in their language. They may simply tap on the indicator to see the original post as well.
For our multilingual logged-in viewers, they may indicate that they understand multiple languages, so content in those languages won’t be translated.
Automatic translations with Discourse AI 
Discourse AI is highly essential for the localization feature, and takes away the need to do manual translations.
As an admin, you’d want to head to our dedicated area in Discourse AI for Translations. This dedicated area covers:
- translation progress
- AI settings
- app language settings
To cover some important settings and recommendations:
AI translation backfill hourly rate- this setting defaults to50- your site will translate 50 posts, 50 topics, 50 categories, 50 tags per hour, to the locales you have set inContent localization supported locales. Keep this to a low number when starting out.AI translation category scope- defaults toPublic categories. You may change this to all categories, or a specific selection.AI translation personal messagesandAI translation include bot contentare self-explanatory.AI translation backfill start date- this value is empty by default. If you enable the AI translation feature “today”, the date is automatically set to “today - 5 days”AI translation post raw translator agent(and other agents) - In more formal communities, admins may choose to create their own agent. This allows you to set a prompt that is more fine-tuned to the language or vocabulary you prefer.
You can refer to AI bot - Agents on how to configure suitable agents and fine-tune prompts for each function.
Manual localization
As localization is a core feature in Discourse, we provide the ability for you to fill in and edit localizations manually in the event automatic translations with Discourse AI is not available.
By default, admins and moderators are set up to edit localizations.
Currently, we have post content, topic title, category name, category description, tag name, tag description, and sidebar localizations. Subsequent sections below will show you how they work.
Category localization
Localized categories are visible in the following areas, with both category name and description localized:
Places where categories are localized 📸
- Homepage, sidebar, and category dropdown
- Categories page
- A specific category with subcategories
As an admin, you should be able to access category settings as usual, and find the new “Localizations” nav item on the left.
Topic and Post localization
From the screenshots above in Category localization, you may have noticed topic titles and excerpts being localized.
There are some pre-requisite settings
- Ensure your user is in
content localization allowed groups - The
addTranslationbutton is automatically added topost menuandpost menu hidden itemswhenContent localization enabledis turned on. This allows the
to show up in the post menu for users in content localization allowed groups. Content localization allow author localizationis enabled by default, and allows post authors to localize their own content using the same post menu as above.
Editing a localized post
In the event the user might be viewing a localized post, and wants to edit the post, a dialog will appear to ask which version they would prefer to edit:
The appropriate composer will appear after deciding.
Custom sidebar localization
Sidebar sections that are “visible to everyone” also show additional translations controls:
Crawlers
You can allow crawlers to see your site in the various languages you’ve configured in Content localization supported locales. The site setting resides in “Content localization” section as Content localization crawler param:
The result would be that crawlers can see the following, where each supported language has a corresponding hreflang in each topic’s head:
For extra proof / verification
We’ve tested this feature extensively, and can confirm that we are getting indexed properly after introducing X numbers of supported languages
FAQ
I’ve set things up, but automatic translation is still not working for me
Confirm if you’ve these set up
Content localization supported localeshas at least one languageContent localization enabledis
Allow user localeis
(enabled by default)Set locale from cookieis
Ai translation enabledis
- You must have a working LLM set for each translation agent
If all else fails, you can enable SiteSetting.ai_translation_verbose_logs.
Are the automatic translations saved, or is it being sent to the LLM each time someone views a topic?
The translations are saved, each post is only sent once per language and the translations are reused.
If my forum supports English and Japanese (via Content localization supported locales), and someone writes in Spanish, will their post be translated?
Yes. All topics and posts will be translated to English and Japanese, regardless of the written language.
If the original post is edited, is it re-translated?
Yes – with a maximum of 2 times per day. When a post is edited, it gets sent to re-translation after a delay of the greater of 5 minutes or the SiteSetting.editing_grace_period to account for ninja edits. Authorized users in Content localization allowed groups have the option to send a post to re-translate immediately.
Will translations be deleted if I change the Agent or LLM?
No, translations will typically persist across settings changes unless explicitly deleted using the post menu item or the translation composer.
























