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.

missing keys during loading changed language

See original GitHub issue

I made the example of the issue here: https://www.webpackbin.com/bins/-KuxsDAcwJ2azm0S41y- Here on the first changeLanguage() I write to the console t('title') right after changing the language and it returns me “missing key error”

I understand it’s not a big deal in some Apps, but If I am using react + redux + redux-form... and my App rerenders on every change. This causes a problem, because it displays constants (or fallbackLng) during the loading a resorce which look bad.

Maybe it would be possible to avoid rerendering before finishing ‘changeLnaguage()’, but I think It would be better if the t() function will return the last valid translate instead of “missing key” during the resource loading.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jamuhlcommented, Sep 26, 2017

see https://www.webpackbin.com/bins/-Kuy3hMrmOV_AtODlLx8

update react-i18next version to v5.4.1 and added bind to options.init:

react: {
      wait: true,
      bindStore: false,
      bindI18n: 'languageChanged'
    }

does the trick

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing a Key? How to Remap and Fix Your Keyboard Layout
Missing a key on your keyboard? Or just want to improve productivity? Learn how to remap your keyboard keys!
Read more >
Advanced Key Settings missing one language?
I am talking about input language, not display language. The very first user account works fine. All other user accounts have the problem....
Read more >
NSLocalizedString shows raw key instead of loading a string ...
When I set the device language to Japanese it shows "key" only but it should show strings from Base(English) file? – ViruMax. Sep...
Read more >
Language Switch Key Missing on Gboard - Android Community
UPDATE: I solved my problem by going to the Google Play store, searching for Gboard, then clicking on "uninstall.
Read more >
Top 5 Fixes for Language Bar Missing in Windows 10
You may have to make a small change in the Windows registry to help the language bar reappear on the taskbar. Press Windows+R...
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