Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature translate locales with region #1391

Conversation

pedrocarmona
Copy link

Context

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

Changes proposed in this pull request

  • Creates content methods that follow mobility convention (underscore locales with region)
  • Adds Portuguese with Portugal region - there was already Portuguese with Brazilian region)

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant