EasyChen
(Easy chen)
November 17, 2025, 4:02am
1
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.
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?
nat
(Natalie T)
November 17, 2025, 4:10am
2
Hey, you can go to the site setting Content localization language switcher to turn it on.
EasyChen
(Easy chen)
November 17, 2025, 4:12am
3
Thanks for the reply. I have already set it to “all”, but it doesn’t seem to be working.
EasyChen
(Easy chen)
November 17, 2025, 4:26am
4
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.
nat
(Natalie T)
November 17, 2025, 4:34am
5
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.
EasyChen
(Easy chen)
November 17, 2025, 4:49am
6
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.
nat
(Natalie T)
November 17, 2025, 5:54am
7
EasyChen:
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.
EasyChen
(Easy chen)
November 17, 2025, 6:07am
8
The language is not displayed, it seems that the automatic language detection has some issues. I will follow up on this. Thank you.
nat
(Natalie T)
November 17, 2025, 6:14am
9
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.
EasyChen
(Easy chen)
November 17, 2025, 7:46am
10
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.