question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default language for missing keys

See original GitHub issue

I’m submitting a…

[ ] bug report
[ ] feature request
[x] support request

Is it possible to default to a specific language if a key is missing in another locale?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
robisim74commented, Jun 7, 2018

@Deams51 Try this:

    providers: [
      { type: ProviderType.Fallback, prefix: './assets/locale/locale-en', fallbackLanguage: [] },
      { type: ProviderType.Static, prefix: './assets/locale/locale-' }
    ]

That’s because fallbackLanguage accepts an array of ISOCode and not the locale. If the array is empty, the provider service uses the prefix as is.

1reaction
robisim74commented, Jun 7, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

Use default language fallback when key is untranslated
Can i use default language (e.g. English) for untranslated keys in my other language Localizable.strings files ?
Read more >
Configuration Options - i18next documentation
'current' or 'all' By default it uses the configured fallback language to save the missing keys to. 'current' will use the current used/detected...
Read more >
How to set default plugin language, when translation is missing
The WP site is using for example french as a default main language. My plugin has translations for other different languages. So, when...
Read more >
Config Options | Transloco Angular i18n - GitHub Pages
Sets the default language/s to use as a fallback. ... Whether to use the fallback language for missing keys or values: (defaults to...
Read more >
Missing translations are shown in English (US) rather than in ...
A non-default language (B, C, ...) lacks some translations and they are then shown in English. Could the backup translations be shown in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found