After creating a development workspace in a multi-language store, there is an error in my website.
Keywords: Development workspace | Internationalization| Messages | Multi-language
After creating a development workspace in a multi-language store, the following error is returned when trying to access the website:
_10Error: messages_10at throwOnGraphQLErrors (/usr/local/app/node_modules/@vtex/api/lib/HttpClient/GraphQLClient.js:10:15)_10at /usr/local/app/node_modules/@vtex/api/lib/HttpClient/GraphQLClient.js:23:15_10at runMicrotasks (<anonymous>)_10at processTicksAndRejections (internal/process/task_queues.js:97:5)_10at MessagesGraphQL.translate (/usr/local/app/node_modules/@vtex/api/lib/clients/apps/MessagesGraphQL.js:50:26)_10at dataloader_1.default.batch (/usr/local/app/node_modules/@vtex/api/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.js:69:15)
This error indicates issues with translations related either to the configuration settings of the vtex.messages
app, which is used for translating storefront content or to the values assigned to the Locale
field within the trade policy configuration.
Solution
To solve this problem, there are several solutions you can consider:
Checking your store language availability
Make sure the desired language is available for your storefront. In some cases, despite being able to select a language in the Locale field within the trade policy configuration, the storefront may not have been translated into that language. In this case, you will receive that error message.
To check which language is set up for your storefront, do the following:
-
Access the trade policy configuration by going to the VTEX Admin and navigating to Store Settings > Channels > Trade Policies.
Open a ticket with VTEX Support to check if the translation is available. If the language is unavailable, you may request the translation through our support in the same ticket.
If the language is available and the problem continues, check if the Locale field’s value is correct.
Checking the Locale field
- Access the trade policy configuration by going to the VTEX Admin and navigating to Store Settings > Channels > Trade Policies.
- Make sure the Locale field’s value is correct. For example, consider a trade policy whose country code is Chile (CHL):
✅ Do | ❌ Don't |
---|---|
es-CL | arn-CL |
See Microsoft’s documentation to check the correct Language Code Identifiers to set up in the Locale field.
If you are still experiencing the same issue, disable the automatic translations in the vtex.messages
app settings.
Disabling automatic translations
If the desired language is available and correct, follow the steps below:
-
In the VTEX Admin, go to Apps > My Apps, and search for the
vtex.messages
app. -
Open the app settings and disable the automatic translations.
The expected behavior is for the multi-language store website to work properly in the development workspace.
After following these steps, if you keep receiving the same error message, open a ticket to VTEX Support.