Errors
No locale found
Paraglide JS was not able to resolve a locale. This can happen if:
- Your strategy array is empty.
- You are using
overwriteGetLocale()
andoverwriteSetLocale()
but forgot to call them at the root/entrypoint of your app.
- You are using the
url
strategy but call messages outside of a request context.
Make sure to call messages within a request context that is set by the paraglideMiddleware:
- You make API requests and only have
strategy: ["url"]
set.
Paraglide JS will only extract the locale from a URL if the request is a document request, indicated by Sec-Fetch-Dest: document to distinguish it from API requests.
Add cookie
or baseLocale
to your strategy array to ensure that the locale is always resolved in API requests as well.