0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/lib/middleware
Natalie Tay cff8f6ea4d
FEATURE: Allow selection of multiple content languages when viewing topics and posts (#42128)
Related:
https://meta.discourse.org/t/multi-language-preferences-for-displaying-localized-content/381116

Allow anon and logged in users to set more than one language that they
understand, when content localization is enabled.


### User preferences

In user preferences, we now include a Content Languages section when the
site has Content Localization enabled.

### Topic menu

In topics where there are any languages that's not the user's language,
the option will appear to set their preferred content languages. This
appears for anon and logged in users, but anon users will be asked to
logged in to set the languages.
__________

These preferences apply only to topic titles and posts. They do not
affect navigational features like categories, tags, or sidebar content.
The per-post option to show the original remains independent of the
user's preferences.

This PR temporarily retains `show_original_content` as a compatibility
field computed from `automatically_translate`, keeping cached clients
and rolling deployments safe. A follow-up PR will remove the legacy API
and frontend compatibility code, then retire the old database column
through the staged column-removal process.
2026-07-30 12:19:44 +08:00
..
anonymous_cache.rb FEATURE: Allow selection of multiple content languages when viewing topics and posts (#42128) 2026-07-30 12:19:44 +08:00
crawler_hooks.rb UX: Prevent incomplete crawler localization settings (#41297) 2026-07-01 12:13:22 +08:00
csp_script_nonce_injector.rb PERF: Avoid replacing CSP nonces in non-cacheable responses (#42008) 2026-07-24 09:49:01 +08:00
default_headers.rb
discourse_public_exceptions.rb SECURITY: Error responses missing Cache-Control header 2025-10-28 14:40:41 +08:00
enforce_hostname.rb
missing_avatars.rb DEV: Enable Rails/FilePath rubocop rule (#40097) 2026-05-19 19:07:54 +02:00
omniauth_bypass_middleware.rb
overload_protections.rb FIX: Include API key requests in overload protection bypass (#39702) 2026-05-07 12:59:11 +08:00
processing_request.rb PERF: Reject anonymous requests with 503 upon aggressive queuing (#36519) 2025-12-18 10:23:42 +08:00
request_tracker.rb FIX: Stop double-counting embedded views with beacon (#41968) 2026-07-24 13:38:00 +08:00
track_view_session_id_injector.rb FIX: Anon pageview session id reused across cached responses (#39879) 2026-05-12 10:13:05 +08:00