i18n.rb 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # frozen_string_literal: true
  2. Rails.application.configure do
  3. config.i18n.available_locales = [
  4. :af,
  5. :an,
  6. :ar,
  7. :ast,
  8. :be,
  9. :bg,
  10. :bn,
  11. :br,
  12. :bs,
  13. :ca,
  14. :ckb,
  15. :co,
  16. :cs,
  17. :cy,
  18. :da,
  19. :de,
  20. :el,
  21. :en,
  22. :'en-GB',
  23. :eo,
  24. :es,
  25. :'es-AR',
  26. :'es-MX',
  27. :et,
  28. :eu,
  29. :fa,
  30. :fi,
  31. :fo,
  32. :fr,
  33. :'fr-CA',
  34. :fy,
  35. :ga,
  36. :gd,
  37. :gl,
  38. :he,
  39. :hi,
  40. :hr,
  41. :hu,
  42. :hy,
  43. :ia,
  44. :id,
  45. :ie,
  46. :ig,
  47. :io,
  48. :is,
  49. :it,
  50. :ja,
  51. :ka,
  52. :kab,
  53. :kk,
  54. :kn,
  55. :ko,
  56. :ku,
  57. :kw,
  58. :la,
  59. :lt,
  60. :lv,
  61. :mk,
  62. :ml,
  63. :mr,
  64. :ms,
  65. :my,
  66. :nl,
  67. :nn,
  68. :no,
  69. :oc,
  70. :pa,
  71. :pl,
  72. :'pt-BR',
  73. :'pt-PT',
  74. :ro,
  75. :ru,
  76. :sa,
  77. :sc,
  78. :sco,
  79. :si,
  80. :sk,
  81. :sl,
  82. :sq,
  83. :sr,
  84. :'sr-Latn',
  85. :sv,
  86. :szl,
  87. :ta,
  88. :te,
  89. :th,
  90. :tr,
  91. :tt,
  92. :ug,
  93. :uk,
  94. :ur,
  95. :vi,
  96. :zgh,
  97. :'zh-CN',
  98. :'zh-HK',
  99. :'zh-TW',
  100. ]
  101. config.i18n.default_locale = begin
  102. custom_default_locale = ENV['DEFAULT_LOCALE']&.to_sym
  103. if Rails.configuration.i18n.available_locales.include?(custom_default_locale)
  104. custom_default_locale
  105. else
  106. :en
  107. end
  108. end
  109. end