You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FEATURE: Show experimental language switcher for anon users (#198)
This commit allows anon users to select a language using a language switcher, this feature is behind an experimental site setting experimental_anon_language_switcher. The set of languages are defined by the same one available to existing users of the site, with the required allow_user_locale setting turned on: https://github.com/discourse/discourse/blob/de7e213052c850aab0258131c47da777ec679621/app/models/locale_site_setting.rb#L37-L50 In the near future, we may consider shortening this list of languages, and will also expand this feature into user-contributed content.
Copy file name to clipboardExpand all lines: config/locales/server.en.yml
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,9 @@ en:
17
17
translator_azure_custom_subdomain: "Required if using a Virtual Network or Firewall for Azure Cognitive Services. Note: Only enter the custom subdomain not the full custom endpoint."
18
18
restrict_translation_by_group: "Only allowed groups can translate"
19
19
restrict_translation_by_poster_group: "Only allow translation of posts made by users in allowed groups. If empty, allow translations of posts from all users."
20
+
experimental_anon_language_switcher: "Enable experimental language switcher for anonymous users. This will allow anonymous users to switch between translated versions of Discourse and user-contributed content in topics."
21
+
errors:
22
+
set_locale_cookie_requirements: "The experimental language switcher for anonymous users requires the `set locale from cookie` site setting to be enabled."
20
23
translator:
21
24
failed: "The translator is unable to translate this content (%{source_locale}) to the default language of this site (%{target_locale})."
22
25
not_supported: "This language is not supported by the translator."
0 commit comments