Translatable Theme Section Checkbox Values

Short description of issue

Translatable Theme Section Checkbox Values

Reproduction steps

  1. Create a Shopify Section used within the Theme Editor
  2. Activate Markets and add multiple Languages
  3. Set the value for Checkbox (true/false)
  4. Go To Translate & Adapt App and try to translate the VALUE (true/false) of the Checkbox

Additional info

My goal:

I want to define the value of the Checkbox per Market and Language. For Example my default market is Germany with the Language German. I also have the Market Switzerland with the Language Italian. I want to set the value of the Checkbox for my Default Market to true and for the Switzerland Market in the Langauge Italian i want to set the value to false.

Only text values are translatable/visible within the Translate & Adapt App. The attached Screenshots show the Section within the Theme Editor and the same Section in the Translate & Adapt App.

What type of topic is this

Feature request

Upload screenshot(s) of issue


Hello @Patrick_Ludewig,

I don’t think you’ll be able to manage using checkboxes as is but maybe using theme locales. Here is some code to showcase how I would do it:

{% # sections/example.liquid %}
{% liquid
  assign checkbox = section.settings.checkbox
  assign translation = 'checkbox.' | append: checkbox | t
%}

{{ translation }}
/* locales/de.json */
{
  "checkbox": {
    "true": "Translation if true",
    "false": "Translation if false"
  }
}

With this setup where you build the locale string using the checkbox setting, you should be able to translate everything inside Translate & Adapt

Hope it helps !

Thank you! Yes, i know that there is no way to solve this issue, thats why it’s labelled as “Feature Request“.

My workaround is using type `text` for these values and add the info, that only `true` or `false` (as string) is allowed. Thats also visible in on of my screenshots, where i already use this approach to show or hide the whole popup per market/language.