Skip to content

Publish a language ​

Last updated View as Markdown

Endpoint: https://api.youcan.shop/languages/{locale}

Method: PUT

Required Scopes ​

  • edit-languages

Notes ​

  • Visitors can browse the store only in published languages.
  • The default language stays published. You get a 422 when you unpublish it.
  • You get a 404 for a language that was not added to the store.

Parameters ​

Param NameParam TypeDescriptionRequired
localestringThe locale of a language from the listing, for example frYes
publishedbooleantrue publishes the language, false unpublishes itYes

Response ​

[200] Ok

json
{
  "locale": "fr",
  "name": "French",
  "primary": false,
  "published": true
}