Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

default translations and access to Locale #386

Closed
wants to merge 6 commits into from

Conversation

duanemay
Copy link

Added 2 features:

  • the ability to have a common default translations file located in app/locales/translations.js
    I use this for product names, and language names that transcend the locale...
    And therefore I don't want to define it in every base language.
  • expose Locale so that I can access translations for a certain language from the code. This is useful in the missing-message.js

@jamesarosen
Copy link
Owner

#256 has some good discussion on the fallback/default locale. I think the approach we want to take is to be able to do i18n.set('defaultLocale', 'es') and have all locales fall back to es/translations.js.

#312 has some good discussion on providing an override locale for one translation. #381 has a prerequisite for the feature. It involves a reserved key name, which is a breaking change, so this can't go out (by default) until 5.0, though we can add a flag to opt-in early.

@toranb
Copy link
Contributor

toranb commented Feb 23, 2018

@duanemay any chance this might still be on your radar (knowing you kicked this off back in the summer of 2016) ?

@toranb
Copy link
Contributor

toranb commented Feb 23, 2018

@jamesarosen did this "breaking change" you mention above land in 5X? Does that unlock anything if someone (like me?) decides to take this back on at some point?

@duanemay
Copy link
Author

@toranb I am no longer in a position where we are using ember, so by all means, you can take it on if you wish.

@toranb
Copy link
Contributor

toranb commented Feb 24, 2018

@duanemay sounds like a plan! Care to close this PR? I'll open mine here in a few ;)

@duanemay duanemay closed this Feb 24, 2018
@toranb
Copy link
Contributor

toranb commented Feb 24, 2018

#478

^I just threw this PR up to help us land a solution for default locale fallback ;)

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

Successfully merging this pull request may close these issues.

3 participants