(English below)
下記コードでタイトルを多言語表記設定をしています。
日本語と英語は問題なく表示されておりますが、简体中文が正常に動作せず、日本語表記となっています。
title=“商品説明” title_en=“Product Description” title_zh=“产品说明(中国語)”
iso_codeに問題があるのか、その他に問題あるのか、アドバイスをいただければ幸いです。
※iso_codeはzh_cnも試しました。
I’m using the following code to set up multilingual titles.
Japanese and English titles are displaying correctly, but Simplified Chinese is not working properly and showing the Japanese version.
title=“商品説明” title_en=“Product Description” title_zh=“产品说明(Chinese)”
Is there an issue with the iso_code, or is there any other problem? Any advoce would be appreciated.
*I’v also tried using “zh_cn” as the iso_code.
{%- if section.settings.title != blank -%}
###
{%- if localization.language.iso_code == 'en' and section.settings.title_en != blank -%}
{{ section.settings.title_en }}
{%- elsif localization.language.iso_code == 'zh' and section.settings.title_zh != blank -%}
{{ section.settings.title_zh }}
{%- else -%}
{{ section.settings.title }}
{%- endif -%}
{%- endif -%}
{% schema %}
{
"name": "商品説明",
"settings": [
{
"type" : "text",
"id" : "title",
"label": "セクションタイトル",
"default": "商品説明"
},
{
"type" : "text",
"id" : "title_en",
"label": "セクションタイトル(英語)",
"default": "Product Description"
},
{
"type" : "text",
"id" : "title_zh",
"label": "セクションタイトル(中国語)",
"default": "产品说明"
},