Change default language after initilazition

Would like to change modal language dynamically on website is it possible?

@goktugkoksal Welcome Aboard!

Your request has been forwarded to our Dev team and we will get back with further updates.

Thanks, looking forward to it. Im using NextJS btw

Hey @vjgee any updates?

No, it is not possible.

As a workaround, you can reinitialize web3auth-modal when language is changed on the dapp

Any idea how to reinitialize modal?

Hey @goktugkoksal,

I haven’t had the chance to try this out myself, but one approach could be to define a state for the language in your application. This language state could then be switched using a dropdown in your app’s UI. You can include this language state as a dependency in the dependency array of the useEffect hook, which contains the Web3Auth initialization code. When initializing Web3Auth, pass this state as the language parameter.

Please give this method a try and let me know how it works out for you.

1 Like