启用商店语言环境-shopLocaleEnable mutation
启用商店的语言环境。
所需的访问
write_locales 访问范围。
在本页面
互动范例
这是一个示例变异查询。
mutation shopLocaleEnable($locale: String!) { shopLocaleEnable(locale: $locale) {} } { “locale”: “placeholder” }
<font style="color:#1F61A0;">shopLocale</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">locale</font><font style="color:#1F61A0;">name</font><font style="color:#1F61A0;">primary</font><font style="color:#1F61A0;">published</font><font style="color:#555555;">}</font><font style="color:#1F61A0;">userErrors</font> <font style="color:#555555;">{</font><font style="color:#1F61A0;">field</font><font style="color:#1F61A0;">message</font><font style="color:#555555;">}</font>
参数
| 参数 | 描述 | 
|---|---|
locale() [String!](https://shopify.dev/docs/admin-api/graphql/reference/scalar#string-2021-01)必需的  | 
指定要启用的语言环境。 | 
返回字段
- shopLocale(
[ShopLocale](https://shopify.dev/docs/admin-api/graphql/reference/translations/shoplocale)
启用的语言环境。 - userErrors(
[[UserError!]!](https://shopify.dev/docs/admin-api/graphql/reference/usererror))
执行突变时发生的错误列表。 
