mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-27 06:03:42 +01:00
173953c23e
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
110 lines
1.2 KiB
Ruby
110 lines
1.2 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
Rails.application.configure do
|
|
config.i18n.available_locales = [
|
|
:af,
|
|
:an,
|
|
:ar,
|
|
:ast,
|
|
:be,
|
|
:bg,
|
|
:bn,
|
|
:br,
|
|
:bs,
|
|
:ca,
|
|
:ckb,
|
|
:co,
|
|
:cs,
|
|
:cy,
|
|
:da,
|
|
:de,
|
|
:el,
|
|
:en,
|
|
:'en-GB',
|
|
:eo,
|
|
:es,
|
|
:'es-AR',
|
|
:'es-MX',
|
|
:et,
|
|
:eu,
|
|
:fa,
|
|
:fi,
|
|
:fo,
|
|
:fr,
|
|
:'fr-CA',
|
|
:fy,
|
|
:ga,
|
|
:gd,
|
|
:gl,
|
|
:he,
|
|
:hi,
|
|
:hr,
|
|
:hu,
|
|
:hy,
|
|
:id,
|
|
:ig,
|
|
:io,
|
|
:is,
|
|
:it,
|
|
:ja,
|
|
:ka,
|
|
:kab,
|
|
:kk,
|
|
:kn,
|
|
:ko,
|
|
:ku,
|
|
:kw,
|
|
:la,
|
|
:lt,
|
|
:lv,
|
|
:mk,
|
|
:ml,
|
|
:mr,
|
|
:ms,
|
|
:my,
|
|
:nl,
|
|
:nn,
|
|
:no,
|
|
:oc,
|
|
:pa,
|
|
:pl,
|
|
:'pt-BR',
|
|
:'pt-PT',
|
|
:ro,
|
|
:ru,
|
|
:sa,
|
|
:sc,
|
|
:sco,
|
|
:si,
|
|
:sk,
|
|
:sl,
|
|
:sq,
|
|
:sr,
|
|
:'sr-Latn',
|
|
:sv,
|
|
:szl,
|
|
:ta,
|
|
:te,
|
|
:th,
|
|
:tr,
|
|
:tt,
|
|
:ug,
|
|
:uk,
|
|
:ur,
|
|
:vi,
|
|
:zgh,
|
|
:'zh-CN',
|
|
:'zh-HK',
|
|
:'zh-TW',
|
|
]
|
|
|
|
config.i18n.default_locale = begin
|
|
custom_default_locale = ENV['DEFAULT_LOCALE']&.to_sym
|
|
|
|
if Rails.configuration.i18n.available_locales.include?(custom_default_locale)
|
|
custom_default_locale
|
|
else
|
|
:en
|
|
end
|
|
end
|
|
end
|