Troubleshooting
Diagnose and fix common issues with the Weglot React package.
Dynamic content stays in the source language
The translation was not ready yet. The first request for a text, or a request slower than 500 ms, returns the source text: reload the page. See When the source text is returned.
The field is not translated. It does not go through
tDynamic,tDynamicAllortDynamicHtmlyet. Check shared fields first: navigation, footer, buttons, page headers, SEO fields and alt texts.
Translations work locally but parts of the live site stay in the source language
A layout or data fetch is cached in one language and served to every visitor. Make the cache depend on the visitor's language, then redeploy without the previous build cache.
The build fails while waiting for translations
New text took longer than translationTimeout. The translations already received are kept in the local cache: run the build again without the .next cache. To wait longer, raise translationTimeout or set WEGLOT_TRANSLATION_TIMEOUT.
Some text in my components is not translated
The file is outside
sourceRoot. PointsourceRootto the folder that contains all your pages and components.The text is in a prop the plugin does not know. Declare it with
translatableAttributes.With
useDirective: true, the file has no'use i18n'directive.
Last updated