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.

Translations are not reflecting even after changing language

See original GitHub issue

Below is my i18n config file.

import i18n from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import trans_en from './i18n/en.json';
import trans_es from './i18n/es.json';
i18n
  .use(LanguageDetector)
  .init({
    // we init with resources
    resources: {
      en: {
        translations:
          trans_en
      },
      es: {
        translations:
          trans_es
      }
    },
    fallbackLng: 'en',

    // have a common namespace used around the full app
    ns: ['translations'],
    defaultNS: 'translations',

    keySeparator: false, // we use content as keys

    interpolation: {
      escapeValue: false, // not needed for react!!
      formatSeparator: ','
    },

    react: {
      wait: true
    },
    isInitialSSR: false
  });

export default i18n;

With above configurations translations are reflecting only with reload. I want it to reflect as value of language get changed.(without reload). Thanks in advance. please help me to solve this problem

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
jamuhlcommented, Oct 9, 2017

sorry was an issue with pureComponent in react-i18next Trans component

https://www.webpackbin.com/bins/-Kw-lKP6C-EHoCY5KK04

solved in react-i18next@6.0.6

1reaction
nikhil4326commented, Oct 10, 2017

Hey Jamuhl, Thanks for efforts and you can close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Translations are not reflected in community immediately after ...
If you update a translation in a community it may not be visible immediately after successfully publishing your community. Repro 1. Login as...
Read more >
Why Aren't My Translations Showing? - WPML
There can be many reasons why translations may disappear or go missing. The simplest and most common cause is not following a consistent...
Read more >
Why my edited translations are not displayed on my website?
Then go to your website, switch the language and check that your edited translations are properly displayed.
Read more >
Translation not reflected - SAP Community
Hello, There is a label in transaction MIRO that is not translated to our language. As you can see is displayed in german:...
Read more >
Translations not showing after update - WordPress.org
Are those translations still showing in Loco Translate? ... Ok, I noticed the change after the WPRM update, but maybe it was a...
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