next-translate icon indicating copy to clipboard operation
next-translate copied to clipboard

Bug using native browser translation

Open mthcalixto opened this issue 4 years ago • 3 comments

I'm using the "next-translate/useTranslation" package.

And when I use the native browser translation and then I try to change the language using the button on my site, the translation fails and I keep the old translation, for example:

If I translate my site to another language and select a language on the button and then go back to the original language of the native browser the next translation will fail.

mthcalixto avatar Sep 08 '21 01:09 mthcalixto

What code do you use to change the site language? The setLanguage function?

import React from 'react'
import setLanguage from 'next-translate/setLanguage'

export default function ChangeLanguage() {
  return (
    <button onClick={async () => await setLanguage('en')}>EN</button>
  )
}

aralroca avatar Sep 08 '21 11:09 aralroca

@aralroca

It's the same function I use.

Screenshot_44

mthcalixto avatar Sep 15 '21 02:09 mthcalixto

I can't reproduce your error. Would you explain the instructions in more detail to reproduce the error? Thanks

aralroca avatar Sep 15 '21 09:09 aralroca