Natalia Ramirez
04/11/2023, 1:49 PMconfig.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
config.i18n.available_locales = [:en, :de]
config.i18n.default_locale = :en
config.i18n.fallbacks = true
Additionally I have created the following method in the application controller:
before_action :set_locale
def set_locale
I18n.locale = :de
end
And of course in the front end I'm using the syntax they use in their own files (example: <%= I18n.t("hello") %>)
I saw that as an admin should be able to choose from available locales for the storefront but no matter what I do, I can't seem to make the german translation appear 🫣😞
Does anyone have any clue what I should be looking into? Any input is greatly appreciated 🙏
Thank you!Sabo
04/11/2023, 2:14 PMconfig.i18n.default_locale = :fr
config.i18n.available_locales = %i(fr it de)
and I can easy change locale from admin panelSabo
04/11/2023, 2:17 PMNatalia Ramirez
04/11/2023, 3:01 PMNatalia Ramirez
04/11/2023, 3:03 PMNatalia Ramirez
04/11/2023, 3:04 PMSabo
04/11/2023, 3:39 PMgem 'solidus_i18n'
gem 'rails-i18n'
Natalia Ramirez
04/11/2023, 3:44 PMSabo
04/11/2023, 4:16 PM