Dictionary Services and APIs
Often, multilingual apps need a dictionary of static phrases that require translation. Commonly this would be items such as form labels, global navigation items, footers, etc.
Sitecore endpoints for dictionary data
There are several options for fetching dictionaries from Sitecore:
- Call the REST Dictionary Service endpoint provided by Headless Services.
- Query the Sitecore Edge Preview GraphQL endpoint provided by Headless Services.
- Query the GraphQL endpoint provided by Sitecore Experience Edge for XM.
- Query the original Sitecore GraphQL Endpoint. This endpoint is currently used by React, Angular and Vue sample applications versions 18.0.0 and earlier.
REST Dictionary Service
The Sitecore REST Dictionary Service endpoint is a REST endpoint providing app-specific dictionary data.
Sitecore Edge Preview GraphQL
Sitecore Experience Edge for XM
Sitecore Experience Edge for XM comes with a read-only GraphQL schema that is designed to accommodate common front-end use cases for headless Sitecore development. Read about the Experience Edge schema.
Sitecore GraphQL Endpoint
The Sitecore GraphQL Endpoint, the first-ever introduced by JSS Server Components, is currently used only by React, Angular and Vue sample applications provided by JSS versions 18.0.0 and earlier.
JSS Dictionary API
When using JSS, you can get dictionary data from any of the endpoints mentioned earlier, without worrying about data fetching implementation details. The JSS Dictionary API abstracts data fetching implementation details into services, clients and data fetchers for both REST and GraphQL endpoints. See some usage examples.