fix: Locale not correct in root url when accessing help center with custom domain (#9110)

- Ensuring that SwitchLocale concern handles the case of custom domain for portals and set locale according to that

Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
Shivam Mishra
2024-03-19 18:48:59 +05:30
committed by GitHub
parent a8b930e351
commit bd97226c95
6 changed files with 24 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ class Public::Api::V1::Portals::BaseController < PublicController
@locale = if article.category.present?
article.category.locale
else
'en'
article.portal.default_locale
end
I18n.with_locale(@locale, &)