You can create and retrieve translated content for Shopify resources, as well as [metaobjects](/docs/apps/build/custom-data/metaobjects) and [metafields](/docs/apps/build/custom-data/metafields). For example, you might add translations of product information and email notification templates using the GraphQL Admin API so a merchant can send email notifications to their customers in multiple languages. Those translations can then be retrieved by either the GraphQL Admin API or the [Storefront API](/docs/storefronts/headless/building-with-the-storefront-api/markets/multiple-languages). This guide shows you how to use the GraphQL Admin API to enable the `es` (Spanish) locale on your store, retrieve a product, translate the product's title, publish the new locale, and view the translated content on your store. ## Requirements - Your app can make [authenticated requests](/docs/api/admin-graphql#authentication) to the GraphQL Admin API. - Your app has the `read_products`, `write_translations`, and `write_locales` [access scopes](/docs/api/usage/access-scopes). Learn how to [configure your access scopes using Shopify CLI](/docs/apps/build/cli-for-apps/app-configuration). - You've created at least one [product](/docs/api/admin-graphql/latest/objects/Product) in your Shopify store. ## Limitations - If you need to change a store's primary locale, then you need to make the change in the Shopify admin. You can't change the primary locale using the GraphQL Admin API. - A resource's `tags` field can't be translated. For example, you can't translate a product's tags. - The translation response that's returned for menu links and email and SMS notification templates doesn't include the `handle` field. - If the merchant changes a product's `handle`, then URL redirects for that product won't be supported for language-specific URLs. - You can translate [metafields](/docs/apps/build/custom-data/metafields) only if they are publicly accessible. - [App proxies](/docs/apps/build/online-store/display-dynamic-data) don't support translations. ## Step 1: Enable a locale The [`ShopLocale`](/docs/api/admin-graphql/latest/objects/shoplocale) object provides the list of primary and alternate locales that have been enabled on a Shopify store. Each locale has the following attributes: - **Primary**: Whether the locale is the default locale for the store. You can only have one primary locale. - **Published**: Whether the locale is visible to buyers. A store can have multiple locales in published or unpublished states. You can use the [`shopLocaleEnable`](/docs/api/admin-graphql/latest/mutations/shopLocaleEnable) mutation to enable a locale on your store. Shopify accepts locales in the following formats: - **Language subtag only**: For example, `en` (English). - **Language subtag + region subtag**: For example, `en-UK` (English as spoken in the United Kingdom). In the `shopLocale` response, include the `locale`, `name`, and `published` fields to verify that the locale has been successfully enabled. > Note: > By default, newly enabled locales aren't published. Shops are limited to 20 enabled locales.