# グローバルメニューの表記について

**URL:** <https://community.shopify.com/t/topic/59975>\
**Category:** 技術的なQ＆A\
**Created:** [August 18, 2021, 2:54am UTC](https://community.shopify.com/t/topic/59975 "2021-08-18T02:54:24Z")\
**Posts on this page:** 7\
**Page:** 1

## AI-generated summary

Shopifyのグローバルメニューで英語＋日本語を併記する実装方法の相談。どのファイルをどう編集すべきかという問いに対し、テーマのナビゲーション表示箇所（Liquid）での出力ロジックの工夫が提案された。

主な提案（Liquid＝Shopifyのテンプレート言語）：
- linklist（ナビゲーションオブジェクト）のtitleを変数にし、case/whenで表示を切り替える。
- メニュー名を「ABOUT/私たちについて」のように設定し、link.title を split('/') で分割して英語（first）と日本語（last）を取り出し、HTML/CSSで整形。
- 代替案（追記）：リンク先ページ側にメタフィールド（カスタムフィールド）で表示文言を持たせ、link.object 経由で取得して表示。ただし、全ページでメタフィールドが使えるわけではないため汎用性は限定的。

更新・訂正：当初提示された「リンク先ページのタイトル取得」関連の参照リンクは誤りとして取り下げ。代わりにメタフィールド案が補足。

進捗・結論：質問者は提案を試す意向を表明。具体的なファイル名の特定には至っていないが、ナビゲーション出力テンプレートの編集方針と実装手順は共有され、実装可能な方向性は示された。議論は事実上収束。

<div class="post-metadata">

**Author:** ![takeoube](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@takeoube](https://community.shopify.com/u/takeoube)\
**Post date:** [August 18, 2021, 2:54am UTC](https://community.shopify.com/t/topic/59975/1 "2021-08-18T02:54:24Z")

</div>

ABOUT

私たちについて

↑こんな感じの、英語と日本語が併記されたメニューにしたいのですが

どのファイルをどのように編集したらよろしいでしょうか。

静的サイトは作れますが、shopifyは初めてです。

---

<div class="post-metadata">

**Author:** ![Jizo\_Inagaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/jizo_inagaki/32/149480_2.png) [@Jizo\_Inagaki](https://community.shopify.com/u/Jizo_Inagaki)\
**Post date:** [September 12, 2021, 5:33am UTC](https://community.shopify.com/t/topic/59975/2 "2021-09-12T05:33:29Z")

</div>

いくつか作り方はあると思いますが、一つは以下のような者が考えられます。

- linklist オブジェクトのtitleを変数として、case/whenで場合分けして出力

参考:

> **[Liquid objects: linklist](https://shopify.dev/docs/api/liquid/objects/linklist)**
>
> A \[menu\](https://help.shopify.com/manual/online-store/menus-and-links/drop-down-menus) in a store.

[https://shopify.dev/api/liquid/tags/control-flow-tags#case-when](https://shopify.dev/api/liquid/tags/control-flow-tags#case-when)

もう一つは、リンク先のページのタイトルが目的に語句である前提ですが、それを取得する方法です。  
以下の公式のサンプルコードが参考になると思います。

[https://help.shopify.com/en/manual/online-store/themes/os/customize/feature-a-subset-of-collections](https://help.shopify.com/en/manual/online-store/themes/os/customize/feature-a-subset-of-collections)

上記の情報で難しい場合はさらに関連情報を探したり別方向の方法を探されるか、エキスパートやパートナーに依頼されることをお勧めします。

---

<div class="post-metadata">

**Author:** ![takeoube](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@takeoube](https://community.shopify.com/u/takeoube)\
**Post date:** [September 12, 2021, 11:56pm UTC](https://community.shopify.com/t/topic/59975/3 "2021-09-12T23:56:14Z")

</div>

ありがとうございます！試してみます！

---

<div class="post-metadata">

**Author:** ![mrtc](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/mrtc/32/109726_2.png) [@mrtc](https://community.shopify.com/u/mrtc)\
**Post date:** [September 13, 2021, 1:24am UTC](https://community.shopify.com/t/topic/59975/4 "2021-09-13T01:24:23Z")

</div>

私がよく使う技して、こんな出力方法もあります。

メニュー名を「ABOUT/私たちについて」で設定

{{ link.title | split: ‘/’ | first }} → ABOUT  
{{ link.title | split: ‘/’ | last }} → 私たちについて

あとは該当箇所のHTMLとCSSを設定するだけです。

---

<div class="post-metadata">

**Author:** ![takeoube](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@takeoube](https://community.shopify.com/u/takeoube)\
**Post date:** [September 13, 2021, 1:27am UTC](https://community.shopify.com/t/topic/59975/5 "2021-09-13T01:27:20Z")

</div>

ありがとうございます！

そのような方法もあるのですね・・！

とても助かります！！

---

<div class="post-metadata">

**Author:** ![Jizo\_Inagaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/jizo_inagaki/32/149480_2.png) [@Jizo\_Inagaki](https://community.shopify.com/u/Jizo_Inagaki)\
**Post date:** [September 13, 2021, 2:07am UTC](https://community.shopify.com/t/topic/59975/6 "2021-09-13T02:07:20Z")

</div>

> もう一つは、リンク先のページのタイトルが目的に語句である前提ですが、それを取得する方法です。\> 以下の公式のサンプルコードが参考になると思います。\> \> [https://help.shopify.com/en/manual/online-store/themes/os/customize/feature-a-subset-of-collections](https://help.shopify.com/en/manual/online-store/themes/os/customize/feature-a-subset-of-collections)

すみません、通知がきたのでたまたま見直しましたが、上記は誤字の上に内容間違ってますね…。  
取り下げさせてただければと思います。

一応ですが、上記で記載予定だった方法と類似のものを追記させていただきます。

- リンク設定対象ページのメタフィールドに必要な文言を設定
- link.listのlinkオブジェクトのlink.objectを通して、リンク設定対象ページのメタフィールドの情報を取得して表示させる

参考:  
[https://help.shopify.com/ja/manual/metafields](https://help.shopify.com/ja/manual/metafields)

> **[Liquid objects: metafield](https://shopify.dev/docs/api/liquid/objects/metafield)**
>
> A \[metafield\](/apps/metafields) attached to a parent object.

[https://shopify.dev/api/liquid/objects/link#link-object](https://shopify.dev/api/liquid/objects/link#link-object)

まだ公式の機能として全てのページがメタフィールドの付与対象になっていないのと、mrtcさんのご回答の方がシンプルなので、上記はそれほどお勧めするものではありませんが。

---

<div class="post-metadata">

**Author:** ![takeoube](https://avatars.discourse-cdn.com/v4/letter/t/53a042/32.png) [@takeoube](https://community.shopify.com/u/takeoube)\
**Post date:** [September 13, 2021, 2:10am UTC](https://community.shopify.com/t/topic/59975/7 "2021-09-13T02:10:37Z")

</div>

ありがとうございます。

当方、初心者なもので様々な方法を提示してくださるのが

とても勉強になります！

気にかけてくださり、感謝いたします。
