jeresig / i18n-node-2

Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
MIT License
507 stars 79 forks source link

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

Open motumas opened 10 years ago

motumas commented 10 years ago

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

gjuchault commented 9 years ago

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

torvalde commented 9 years ago

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 commented 9 years ago

Okay this makes some sense

Please commit to :

sceee commented 6 years ago

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

gjuchault commented 6 years ago

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