2 つのロケール ファイルがあります。
- 構成/ロケール/en.yml
- 構成/ロケール/es-cl.yml
「es-CL」の翻訳がない場合、デフォルトのロケールとして「en」を使用して英語に翻訳したいと考えています。だから、これは私のapplication.rbファイルです:
config.i18n.available_locales = ['en', 'es-CL']
config.i18n.default_locale = 'en'
config.i18n.locale = 'es-CL'
production.rb について
config.i18n.fallbacks = true
しかし、サーバーを起動すると、ロケールは英語になります。
es-cl.yml のチャンク ( config.i18n.default_localeを「es-CL」に設定すると、翻訳が機能します)
es-CL:
activerecord:
models:
admin_user:
one: Administrador
other: Administradores
producer:
one: Productora
other: Productoras
ticket:
one: Ticket
other: Tickets