After configuring AI translation, posts have been automatically translated, but the language switching button is not displayed at the top and right of the post

סיכום מבוסס בינה מלאכותית

用户 EasyChen 在配置 Discourse AI 翻译后,发现帖子虽已自动翻译,但顶部和右侧未显示语言切换按钮。nat 提示应检查站点设置中的“内容本地化语言切换器”选项。EasyChen 补充说明,虽然右上角有按钮,但帖子内部的顶部和右侧仍无语言标签。nat 建议编辑帖子以触发自动语言检测,并指出该过程可能需要时间。EasyChen 进一步测试后发现,调整相关设置后,语言切换按钮在新浏览器中正常显示。EasyChen 最终确认问题已解决。

Hello everyone, I just finished setting up Discourse and followed the guide at https://meta.discourse.org/t/content-localization-manual-and-automatic-with-discourse-ai/370969 to set up automatic translation.

Now, from the translation progress in the backend, I can see that the post content has been translated.
image

However, the language switching icon does not appear at the top or side of the posts, which prevents me from viewing the translated results.

As shown in the Chinese post in the image, the translated content is not visible and there is no translation button when in the English interface.

The language selection button in the upper right corner of the interface does appear, but it can only adjust the interface language.

How should I adjust the configuration or troubleshoot the issue?

Hey, you can go to the site setting Content localization language switcher to turn it on.

Thanks for the reply. I have already set it to “all”, but it doesn’t seem to be working.

image

Perhaps I didn’t make it clear enough before, the language switching button in the upper right corner of the site can be displayed, but there are no language labels on the right and top of the posts and in the menu.

Screenshot 2025-11-17 at 12.24.07

Are you referring to this?

This will only show up if the post language is different from your user’s chosen language, to indicate the “original” language.

Yes, neither the top nor the right side is displayed. My interface is set to English (as indicated by the date on the right), and the posts are in Chinese.

I have enabled SiteSetting.ai_translation_verbose_logs = true.

Here are the relevant logs:

Message (4 copies reported)

DiscourseAi::Translation: Detected 2 topic locales

Backtrace

/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.4/lib/active_support/broadcast_logger.rb:218:in block in dispatch' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.4/lib/active_support/broadcast_logger.rb:217:in map’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.4/lib/active_support/broadcast_logger.rb:217:in dispatch' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activesupport-8.0.4/lib/active_support/broadcast_logger.rb:129:in warn’
/var/www/discourse/plugins/discourse-ai/lib/translation/verbose_logger.rb:8:in log' /var/www/discourse/plugins/discourse-ai/app/jobs/scheduled/topics_locale_detection_backfill.rb:45:in execute’
/var/www/discourse/app/jobs/base.rb:318:in block (2 levels) in perform' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-7.0.0/lib/rails_multisite/connection_management/null_instance.rb:49:in with_connection’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rails_multisite-7.0.0/lib/rails_multisite/connection_management.rb:17:in with_connection' /var/www/discourse/app/jobs/base.rb:305:in block in perform’
/var/www/discourse/app/jobs/base.rb:301:in each' /var/www/discourse/app/jobs/base.rb:301:in perform’
/var/www/discourse/app/jobs/base.rb:381:in perform' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:137:in process_queue’
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:77:in worker_loop' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/mini_scheduler-0.18.0/lib/mini_scheduler/manager.rb:63:in block (2 levels) in ensure_worker_threads’

I don’t know if this is related.

Can you edit this post, then check if the post locale has been detected yet?

It would ideally show up as zh_CN.

Automatic post locale detection takes time and is required to determine what the language of the post is. You can also set this yourself in the composer, then the automatic detection will be skipped if the value is set.

image
The language is not displayed, it seems that the automatic language detection has some issues. I will follow up on this. Thank you.

I don’t think there’s an issue per se, the job takes time to go through all posts. Increasing the backfill rate in settings should make things go faster. From your logs above it looks like only 2 posts every 5 minutes.

After adjusting the rate, I tested with a new browser and found that it displayed correctly. The original browser could also display multiple languages after I logged out of the admin account and cleared the cookies. Thank you.