---
title: "JSS辞書API"
slug: "jss-dictionary-api"
abstract: "辞書を取得するためのJSS APIへの導入Sitecore"
---
# JSS辞書API

多くの場合、多言語アプリには翻訳が必要な静的なフレーズの辞書が必要です。一般的には、フォームラベル、グローバルナビゲーション項目、フッターなどの項目が含まれます。

Sitecore JavaScript Rendering SDK(JSS)は、[Sitecore辞書サービス](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/dictionary-service.html "Dictionary Service")を使ってアプリケーション固有の翻訳辞書を取得するためのAPIを提供します。

JSSを使用する場合、実装の詳細を気にせずに複数のエンドポイントから辞書データを取得できます。JSS辞書APIは、実装データ取得の詳細をRESTおよびGraphQLエンドポイント向けのサービス、クライアント、データフェッチャーに抽象化します。いくつかの[使用例](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/fetching-dictionary-data-with-the-jss-dictionary-api.html "Fetching dictionary data with the JSS Dictionary API")をご覧ください。

辞書データがフロントエンドアプリケーションで利用可能になった後、どのように活用するかや、どの国際化ライブラリを好みますかを選択できます。例えば、React JSSアプリケーションは[カスタムプラグイン](https://www.i18next.com/misc/creating-own-plugins)付きのi18nextモジュールを利用しています。

## Sitecore endpoints for dictionary data

Sitecoreから辞書フレーズを取得するためのいくつかのオプションがあります:

-   [Sitecore Headless Services](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/sitecore-headless-services.html "Sitecore Headless Services")が提供する[REST辞書サービスエンドポイント](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/dictionary-service.html "Dictionary Service")に連絡してください。Sitecore辞書サービスエンドポイントは、アプリ固有の辞書データを提供するRESTエンドポイントです。
-   [Headless Servicesが提供するエンドポイントGraphQL Sitecore Edge Preview](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/sitecore-experience-edge-for-xm-preview-graphql-endpoint.html "Sitecore Experience Edge for XM Preview GraphQL endpoint")をクエリしてください。Sitecore Edge Preview GraphQL APIは、Sitecoreの上にGraphQLサーバーを実装したものです。Sitecore GraphQLスキーマはExperience Edgeスキーマをミラーリングしています。
-   [Sitecore Experience Edge for XM](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/sitecore-experience-edge-for-xm.html "Sitecore Experience Edge for XM")が提供するGraphQLエンドポイントをクエリしてください。Sitecore Experience Edge for XMは、ヘッドレスSitecore開発の一般的なフロントエンドユースケースに対応するよう設計された読み取り専用のGraphQLスキーマを備えています。Experience Edgeスキーマについて読んでみてください。
-   [Sitecore GraphQL Endpoint](https://doc.sitecore.com/xp/ja/developers/hd/19/sitecore-headless-development/sitecore-graphql-api.html "Sitecore GraphQL API")をクエリしてください。これはServer Componentsが導入した初のGraphQLエンドポイントJSS。このエンドポイントは現在、React、Angular、Vueのサンプルアプリケーションバージョン*18.0.0以前**でのみ*使用されています。

JSSアプリケーションを作成する際、パラメータ \--fetchWith RESTまたは \--fetchWith GraphQLでエンドポイントをRESTかGraphQLか選択できます。