Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Translate section object

Translate section object

rpiscopo-easywe
Shopify Partner
2 0 0

Hey there,

I'm trying to develop a new section object for my store.

I don't know how to make translatable the fields defined in the settings part of the json schema.

 

I added a new liquid file in the section theme folder, this is my code (not the final one):

<p>{{ section.settings.title | t }}</p>

{% schema %}
{
  "name": "Password",
  "tag": "section",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "label": "Titolo"
    }
  ],
  "locales": {
    "en": {
      "title": "Slideshow"
    }
  },
  "presets": [
    {
      "category": "Advanced",
      "name": "Password",
      "settings": {}
    }
  ]
}
{% endschema %}

And this is my back-office:

Cattura.PNG

This is what I see on the shop in both languages:

Cattura3.PNGCattura2.PNG

I'd like to translate the title filed based on locales, but I cannot understand how.

Thank you so much.

Replies 0 (0)