Support for fallback language
See original GitHub issueI wasn’t able to find this is the docs or on the internet. Is there a way to have the translation fallback to the standard language if it can’t find a dialect?
I.E
I have a en.json
file. When I retrieve the locale, I’d like to set it and have it fall back to the language if it can’t find the dialect.
en-US
& en-GB
& en-UK
should fall back to en.json
if the file doesn’t exist.
fr-CA
should fallback to fr.json
and then whatever I specified as default if it doesn’t find fr.json
Is this how the library works, and if not how can I get it to function this way?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:9
Top Results From Across the Web
Fallback languages – Support Help Center - Optimizely
Set fallback and replacement languages. Fallback and replacement languages are defined from the All Properties edit view, when editing a page or ...
Read more >Fallbacks - Federal Reserve Bank of New York
The ARRC released updated recommended contractual fallback language for USD LIBOR denominated syndicated loans. The hardwired fallback language was updated to ...
Read more >Glossary Fallback Language - Smartling Help Center
A Fallback Language is essentially the source language of an old Glossary that is not a source language of any assigned Linguistic Package...
Read more >[Language Fallback] Support - WordPress.org
Support » Plugin: Language Fallback ... Plugin doesn't fall back to language ... get_language_attributes() returns the fallback language's locale.
Read more >Fallback languages - LingoHub
A fallback language is a language that will be used when a text segment is empty upon export, e.g., due to a missing...
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
I’d expect the same behavior to be provided. It seems it isn’t available.
@SamFarrington This won’t fall back to the specific language. Think about
en-US
andde-AT
.Thanks, that is almost exactly what I ended up doing.