i18n-node-2 icon indicating copy to clipboard operation
i18n-node-2 copied to clipboard

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

Open motumas opened this issue 11 years ago • 5 comments

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

motumas avatar Feb 25 '14 12:02 motumas

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

gjuchault avatar Jun 23 '15 22:06 gjuchault

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.

torvalde avatar Jun 24 '15 12:06 torvalde

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

gjuchault avatar Jun 27 '15 22:06 gjuchault

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

sceee avatar Apr 12 '18 18:04 sceee

@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.

gjuchault avatar Apr 13 '18 13:04 gjuchault