0

I'm trying to show a text in spanish using locales, but it keeps using english as default. My code:

# config/application.rb
config.i18n.default_locale = :es

# config/locales/es.yml
es:
  sections:
    fashion: Moda

# haml template
= t("sections.fashion")

In the view is generating the following html: <span class="translation_missing" title="translation missing: en.sections.fashion">Fashion</span>. Am I missing something?
Thanks in advance

Alter Lagos
  • 12,090
  • 1
  • 70
  • 92

1 Answers1

0

Try installing the gem: rails-i18n

In my case it was the solution.

https://github.com/svenfuchs/rails-i18n

MAJS
  • 86
  • 1
  • 5