> For the complete documentation index, see [llms.txt](https://developers.weglot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.weglot.com/frameworks-and-ai/react/troubleshooting.md).

# 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](/frameworks-and-ai/react/dynamic-content.md#when-the-source-text-is-returned).
* **The field is not translated.** It does not go through `tDynamic`, `tDynamicAll` or `tDynamicHtml` yet. 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`. Point `sourceRoot` to the folder that contains all your pages and components.
* The text is in a prop the plugin does not know. Declare it with [`translatableAttributes`](/frameworks-and-ai/react/use-cases.md#translate-your-own-component-props).
* With `useDirective: true`, the file has no `'use i18n'` directive.

{% hint style="info" %}
Still stuck? Contact <help@weglot.com> and mention that you use `@weglot/translate-react`, with your framework and its version.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.weglot.com/frameworks-and-ai/react/troubleshooting.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
