Skip to content

Added support for translate() fallback to default locale key/value#29

Open
motumas wants to merge 13 commits intojeresig:masterfrom
jotta:master
Open

Added support for translate() fallback to default locale key/value#29
motumas wants to merge 13 commits intojeresig:masterfrom
jotta:master

Conversation

@motumas
Copy link
Copy Markdown

@motumas motumas commented Feb 25, 2014

Added support for translate() fallback to default locale key/value if requested locale file don't have the requested key/value.

@gjuchault
Copy link
Copy Markdown
Collaborator

Well, if you use a german locale, maybe getting an english value when the key is not found is not what users want.

@torvalde
Copy link
Copy Markdown

The alternative is just to see the key (that probably also is in english) if the translation is missing for that country... If you use variables in your translations this can get messy. By enabling the fallback to the default country it would be possible to deploy some translations before all the translations are complete, this is useful for large projects.

@gjuchault
Copy link
Copy Markdown
Collaborator

Okay this makes some sense

Please commit to :

  • Fix indentation
  • Push version
  • Add a note on the changelog
  • Add an option (different from devMode that is mostly for debugging) fallbackToDefault defaulting to false
  • Add some doc on that option

@sceee
Copy link
Copy Markdown

sceee commented Apr 12, 2018

@torvalde @gjuchault is this still active? I am looking exactly for this.

@gjuchault
Copy link
Copy Markdown
Collaborator

@sceee I'm not an active maintainer this days, and I can't merge a branch with conflicts / not ready. You're free to create another clean pull-request with the same changes if you want.

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.

4 participants