Fall back to root locale?
See original GitHub issue@kazupon When changing $i18n.locale at a component, it doesn’t update the root locale. So when a key is not found in the component, the translation falls back to the root which can have a different locale.
To solve this issue, should the root locale be updated when setting $i18n.locale? Or should the locale in _t()
be passed to t()
so the same locale is used for fallback to root?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Disable warnings for fallback to root locale #139
My use case for component locales is as follows: Commonly used words are global locales (firstname, lastname, .
Read more >Fallback localization | Vue I18n
If a locale is given containing a territory and an optional dialect, the implicit fallback is activated automatically.
Read more >Root locale and fallback
Issues. ULocale#getFallback() never get to ULocale. ROOT (ticket#6673), instead, the final locale is empty locale (new ULocale("")), then null.
Read more >Falling back to the standard locale - Solution - Linux Tutorials
Debian-based and Ubuntu solution · First make sure that you have the locales package installed: $ sudo apt update $ sudo apt install...
Read more >Fallbacking - Vue I18n - Intlify
If a locale is given containing a territory and an optional dialect, the implicit fallback is activated automatically.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This works
this.$root.$i18n.locale
I am facing the same issue. Here is my work scenario. when my page load 1st time, it will be in English (that’s working fine) now lets say i change the locale to ‘
de
’ and refresh the page. whats happening here is that, my page is being load in English 1st and then less then in second it updating in ‘German
’. So its looking really a bug.My setup -
added
i18n
in plugin folder and then initialized innuxt.config.js
as below-I don’t know where i m doing wrong. @kazupon @cslee Please suggest.
See this output - https://user-images.githubusercontent.com/4952560/39049618-dad49b26-44bf-11e8-8b6b-26b47b6bbae9.gif