kazupon / vue-i18n

:globe_with_meridians: Internationalization plugin for Vue.js
https://kazupon.github.io/vue-i18n/
MIT License
7.28k stars 861 forks source link

Extending the feature for Fallback Localization #687

Closed manojchowdary27 closed 5 years ago

manojchowdary27 commented 5 years ago

Hello,

I have gone through the documentation and found "fallbackLocale" property which will be used if the key doesn't exist in desired locale during trnsalation. But It would be awesome when there is fallback for the fallbackLocale.

Example:

const i18n = new VueI18n({ locale: 'ja', fallbackLocale: 'en', messages })

In the above configuration if the key doesn't exist in ja, It will check for en What if the doesn't exist in en also? It will print the path of the property which looks ugly to the end user. So I think we need something similar to the following $t("property.nestedProperty.hello", { fallbackMessage: 'A clear fallback message' })

vue & vue-i18n version

ex: 2.1.0, 5.0

Reproduction Link

Steps to reproduce

What is Expected?

What is actually happening?

kazupon commented 5 years ago

close (similar issue #138 )