2022-06-05 11:40:43 +02:00
|
|
|
# Configure I18n to look at subfolders too
|
|
|
|
|
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.yml')]
|
|
|
|
|
|
2024-03-15 00:14:31 +01:00
|
|
|
I18n.available_locales = [:en, :it, :de, :fr, :es, 'zh-CN', :ru, :vi]
|
2024-01-08 23:13:39 +07:00
|
|
|
|
2024-02-14 11:07:23 +01:00
|
|
|
# Custom pluralization rules
|
|
|
|
|
# Those must be mirrored in app/javascript/translations/index.js.erb
|
|
|
|
|
I18n::Backend::Simple.include(I18n::Backend::Pluralization)
|
2024-03-15 00:14:31 +01:00
|
|
|
I18n.backend.store_translations 'zh-CN', i18n: { plural: { rule: lambda { |n| :other } } } # Chinese simplified
|
2024-02-14 11:07:23 +01:00
|
|
|
I18n.backend.store_translations :vi, i18n: { plural: { rule: lambda { |n| :other } } } # Vietnamese
|