xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
594 stars 49 forks source link

Fix fallback locale #103

Closed lenssoft closed 1 year ago

lenssoft commented 1 year ago

Fix for Issue 87: FallbackLocale not working

fallback locale is loaded first (in browser mode) if active message has no value or the value equals with the key then use fallback locale translation

xiCO2k commented 1 year ago

Thanks for the contribution, can you please add a test to make sure it works?

lenssoft commented 1 year ago

Updated the tests and added some to cover the usecase. I had to introduce a new plugin option "fallbackMissingTranslations" in order to keep existing funtionality unchanged and prevent existsing tests from failing.

If accepted readme file should be updated with the new option. Thanks

lenssoft commented 1 year ago

@xiCO2k any update on this?

xiCO2k commented 1 year ago

Thanks.