Add 🇨🇳 Chinese simplified (#310)

Thanks to omltcat for the translation!
This commit is contained in:
Riccardo Graziosi
2024-03-15 00:14:31 +01:00
committed by GitHub
parent 8a133ddbfe
commit 437262040a
3 changed files with 4 additions and 1 deletions

View File

@@ -1,11 +1,12 @@
# Configure I18n to look at subfolders too
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.yml')]
I18n.available_locales = [:en, :it, :de, :fr, :ru, :es, :vi]
I18n.available_locales = [:en, :it, :de, :fr, :es, 'zh-CN', :ru, :vi]
I18n.default_locale = :en
# Custom pluralization rules
# Those must be mirrored in app/javascript/translations/index.js.erb
I18n::Backend::Simple.include(I18n::Backend::Pluralization)
I18n.backend.store_translations 'zh-CN', i18n: { plural: { rule: lambda { |n| :other } } } # Chinese simplified
I18n.backend.store_translations :vi, i18n: { plural: { rule: lambda { |n| :other } } } # Vietnamese