- replace the layout.js in the /app root folder by the version you want.
- replace the layout.js in the [lang] root folder by the same version.
You'll get all the cases I tested.
- No layout.js in the root folder
- layout.js in the [lang] folder
=> DOES NOT WORK
The intercom widget shows up, but when switching language, the IntercomClientProvider is unable to re-attach its context and the Intercom widget disappears.
If you switch langage AGAIN, then a client errors shows up.
- layout.js in the root folder without the <html> tag
- layout.js in the [lang] folder with the <html lang=...> tag
=> DOES NOT WORK
The intercom widget shows up, but when switching language, the IntercomClientProvider is unable to re-attach its context and the Intercom widget disappears.
- layout.js in the root folder with the <html> tag
- layout.js in the [lang] folder without <html> tag
=> DOES NOT WORK
=> DOES ALMOST WORK
The intercom widget shows up. Switching language works. But there is no way to add the lang attribute to the html tag, which is very bad for SEO.
Same as 1, 2 and 3 but with a custom implementation of useIntercom I used to try to understand what happened.