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 doesn't work when switching language with disabled useCookie property

See original GitHub issue

Version

v6.4.1

Reproduction link

https://codesandbox.io/s/thirsty-lake-m7vwr

Steps to reproduce

Click on the link with the label: “Deutsch”

What is expected ?

The string “English string” should get translated to “Deutscher string”

What is actually happening?

Clicking the link changes the route to “/de”, which is fine. But the text doesn’t get translated. If you set useCookie: true in the nuxtConfig again, it works as expected. Same behaviour can be observed, when you set useCookie: true AND disable the cookies in the browser

<div align="right">This bug report is available on Nuxt community (#c370)</div>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
rchlcommented, Feb 26, 2020

Looks like a bug, the module logic should be improved.

For your case, you could set detectBrowserLanguage to false. Currently you have it set to:

detectBrowserLanguage: {
  useCookie: false,
  alwaysRedirect: false,
  cookieKey: "i18n_redirected",
  fallbackLocale: "en"
}
1reaction
rchlcommented, Mar 31, 2020

I have made a fix that should address that in #651 (not yet integrated at the time of writing).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Translations doesn't work when switching language with ...
Clicking the link changes the route to "/de", which is fine. But the text doesn't get translated. If you set useCookie: true in...
Read more >
Change Chrome languages & translate webpages - Computer
Go to a webpage written in another language. On the right of the address bar, click Translate . Chrome will translate your current...
Read more >
Common Errors with Exporting and Importing Translation Files
This error message only applies to data translation files. Data translation isn't enabled or was disabled after the data translation file was exported....
Read more >
Localization and translation - Shopify Help Center
When customers land on a translated URL, your store automatically shows the translated version if translations exist. Note. Except for Shopify Lite, each...
Read more >
Change your translation settings in Outlook.com and Outlook ...
Change your translation settings · At the top of the page, select Settings Settings · Under Translation, choose one of the following: Ask...
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