SpinaCMS / Spina

Spina CMS
http://www.spinacms.com
Other
2.2k stars 407 forks source link

Feature translate locales with region #1391

Closed pedrocarmona closed 3 weeks ago

pedrocarmona commented 3 weeks ago

Context

Allow locales with region (example pt-PT: Portuguese from Portugal region)

Changes proposed in this pull request

Guidance to review

# config/initializers/spina.rb
Spina.configure do |config|
  ..
  config.locales = [ :'pt-PT', :en ]
# config/initializers/mobility.rb
Mobility.configure do
  ... 
  locale_accessors [ :'pt-PT', :en ]
# config/application.rb
  ...
  config.i18n.default_locale = :'pt-PT'
pedrocarmona commented 3 weeks ago

maybe this is not the best approach, maybe for now should be enough to convert pt-BR.yml into pt.yml

or even use i18n fallbacks