Translations for Address Form Fields (Beta)
Translations for Address Form Fields (Beta)
Translations for Address Form Fields (Beta)
The Translations Admin GraphQL API is currently available on Catalyst storefronts only.
The following entities are translatable for address form fields:
label - The display label for the form fieldoption_{base64string} - Option values where the base64 string encodes the original option textThe entities listed above are referenced differently based on resource type and must use the following values in the queries outlined below:
label - The display label for the form fieldoption_{base64string} - Option values where the base64 string encodes the original option text
option_UmVzaWRlbnRpYWw= (where UmVzaWRlbnRpYWw= is base64 for “Residential”)option_Q29tbWVyY2lhbA== (where Q29tbWVyY2lhbA== is base64 for “Commercial”)Below are examples of GraphQL queries and mutations for retrieving and managing translation settings for address form fields.
This query returns a paginated list of translations by resourceType, channel, and locale with a maximum of 50 results per request.
The request below uses several variables for reusability. Replace {{channel_id}} and {{locale_code}} with the appropriate values for your use case.
This query returns translation(s) by resourceId.
The request below uses several variables for reusability. Replace {{resourceId}}, {{channel_id}}, and {{locale_code}} with appropriate values for your use case. Make sure resourceId follows the format from the Resource fields table.
This mutation updates a translation.
The mutation example above shows a successful response. If invalid fields are provided, the API will return an error response. See the Error Handling Reference for more details on error responses.
Example error response for invalid fields:
The following mutation deletes a translation.