Dev guideRecipesAPI ReferenceChangelog
Dev guideRecipesUser GuidesNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Locale

Describes the locale parameter, part of the GraphQL API used for the Optimizely querying service, when retrieving content in Optimizely solutions.

The locale argument routes a GraphQL query to the language-specific indices in Optimizely Graph and applies the matching linguistic analysis to the search. Use it to scope results to one or more languages, to fall back to a language-neutral index for assets, or to query across every indexed language at once. Choosing the right locale improves both the relevance of full-text search and the correctness of language-specific operators.

When you set the locale parameter in the GraphQL request, the query performs the following:

  1. Filters the content by routing to the specified language content.
  2. Uses linguistic processing of content when using the contains operator on a field. For example, supports tokenization of words, decompounding, and stemming of these words.
📘

Note

Having plural values, such as "pommes, noisettes", stems from their (algorithmic) base form, so searching for singular forms also matches, like "pomme noisette".

The locale parameter takes a list of one or more locale values as input. With fixed locale values, such as NEUTRAL or ALL, the locale values are input from the content type setting. When indexing data without a specified locale, Optimizely Graph uses an index without any language processing for matching. The locale parameter is directly related to the language_routing parameter. When searching data without a specified locale, Optimizely Graph uses all indexes for matching.

Content with a locale that is not in the supported locales still supports full-text search, but it does not use linguistic processing of content. This affects the tokenization, decompounding, and stemming of words in the text and reduces the accuracy of the search engine. When Optimizely Graph adds support for a locale later, a resync improves the search engine performance with no changes required on the front end.

Locale settingIndexingSearching
NEUTRAL-Standard index.
ALL-All indexes.
Without language_routing or locale parameter.Standard index.All indexes.
With language_routing or locale parameterIndex each document to a separate index for each provided language.Search in a separate index for each provided language. It also adds language support for the full-text search operators contains and match for each provided language.

Locale format

The locale format defines how to write locale values in the locale parameter so that Optimizely Graph routes the query to the correct indices. The following locale formats are available:

  • Fixed locale values, NEUTRAL and ALL.
  • The value must start in lowercase, such as en, sv.
  • Query a specific locale, such as en_GB, en_US.
  • Query single or multiple locales by using commas as a delimiter.
query MyQuery {
  Content(locale: [NEUTRAL, en, en_GB, en_US, sv, nl]) {
    items {
      Name
    }
  }
}

Supported locales with language analysis

Optimizely Graph applies language-specific analysis (such as tokenization, decompounding, and stemming) only for the locales in the following table. The following languages are supported with language analysis for search, with their two-letter locale values. You can extend these with culture-specific information.

Language2-letter Locale
Arabicar
Bulgarianbg
Brazilianbr
Catalanca
CJK (special)cjk
Germande
Greekel
Englishen
Spanishes
Basqueeu
Farsifa
Finnishfi
Frenchfr
Galiciangl
Hindihi
Hungarianhu
Armenianhy
Indonesianid
Italianit
Japaneseja
Koreanko
Kurdishku
Latvianlv
Dutchnl
Norwegianno
Polishpl
Romanianro
Russianru
Swedishsv
Thaith
Turkishtr
Ukrainianuk
Chinesezh

Examples

The following examples show how to use the locale parameter to query a single language, every language, or a mix of languages and locales.

Query with NEUTRAL value

Returns the content items from the standard index (these items are not classified to any specific language), including content items that have the language empty "" or null (those content items are asset content).

query MyQuery {
  Content(locale: NEUTRAL, limit: 100) {
    items {
      Name
      Language {
        Link
        DisplayName
        Name
      }
    }
  }
}

Result

{
"data": {
 "Content": {
   "items": [       
     {
       "Name": "logotype.png",
       "Language": {
         "Link": "http://localhost:8081/contentassets/ed475b914904443795e8c63f91afcb5c/logotype.png",
         "DisplayName": "Invariant Language (Invariant Country)",
         "Name": ""
       }
     },
     {
       "Name": "AlloyPlan.png",
       "Language": {
         "Link": "http://localhost:8081/contentassets/3b16c17d494344de87c29324395d01bb/alloyplan.png",
         "DisplayName": "Invariant Language (Invariant Country)",
         "Name": ""
       }
     },
     {
       "Name": "AlloyPlanScreen.png",
       "Language": {
         "Link": "http://localhost:8081/contentassets/3b16c17d494344de87c29324395d01bb/alloyplanscreen.png",
         "DisplayName": "Invariant Language (Invariant Country)",
         "Name": ""
       }
     }
   ]
 }
},
"extensions": {
 "correlationId": "b37f03b1-7901-4386-a04a-78f55b85ba5c",
 "cost": 104,
 "costSummary": [
   "Content(104) = limit(100) + fields(4)"
 ]
}
}

Query with ALL value

Returns the content items from all indexes, including the standard index and specific languages.

query MyQuery {
Content(locale: ALL, limit: 100) {
 items {
   Name
   Language {
     Link
     DisplayName
     Name
   }
 }
}
}

Result

{
"data": {
"Content": {
 "items": [
   {
     "Name": "Reporting Made Simple",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/events/reporting-made-simple/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Collaboration Made Simple",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/events/collaboration-made-simple/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Risk Management",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/events/risk-management-in-complex-projects/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Saves Bears",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/press-releases/newworld-wildlife-fund-chooses-alloy/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Enhances Risk Management",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/press-releases/alloy-plan-enhances-risk-management/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Top Collaboration Technology",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/press-releases/alloy-meet-acclaimed-for-top-collaboration-technology/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Trek Selects Alloy Plan",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/press-releases/trek-selects-alloy-plan/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Events",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/events/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Press Releases",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/press-releases/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Michelle Hernandez",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contacts/michelle-hernandez/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Todd Slayton",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contacts/todd-slayton/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Robert Carlsson",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contacts/robert-carlsson/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Fiona Miller",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contacts/fiona-miller/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Amar Gupta",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contacts/amar-gupta/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Management",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/management/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Contact us",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contact-us/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Become a reseller",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/become-a-reseller/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Whitepaper",
     "Language": {
       "Link": "http://localhost:8081/en/alloy-track/download-whitepaper-alloy-track/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "News & Events",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/news-events/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Find a reseller",
     "Language": {
       "Link": "http://localhost:8081/en/how-to-buy/find-a-reseller/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Contacts",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/contacts/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Search",
     "Language": {
       "Link": "http://localhost:8081/en/search/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Meet",
     "Language": {
       "Link": "http://localhost:8081/en/alloy-meet/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "About us",
     "Language": {
       "Link": "http://localhost:8081/en/about-us/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Plan",
     "Language": {
       "Link": "http://localhost:8081/en/alloy-plan/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Track",
     "Language": {
       "Link": "http://localhost:8081/en/alloy-track/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "How to buy",
     "Language": {
       "Link": "http://localhost:8081/en/how-to-buy/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Meet jumbotron",
     "Language": {
       "Link": null,
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Plan teaser",
     "Language": {
       "Link": null,
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Track teaser",
     "Language": {
       "Link": null,
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Alloy Meet teaser",
     "Language": {
       "Link": null,
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Customer Zone",
     "Language": {
       "Link": "/en/customer-zone/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Reseller extranet",
     "Language": {
       "Link": "/en/customer-zone/reseller-extranet/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Start",
     "Language": {
       "Link": "http://localhost:8081/en/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "Test page",
     "Language": {
       "Link": "http://localhost:8081/en/test-page/",
       "DisplayName": "English",
       "Name": "en"
     }
   },
   {
     "Name": "logotype.png",
     "Language": {
       "Link": "http://localhost:8081/contentassets/ed475b914904443795e8c63f91afcb5c/logotype.png",
       "DisplayName": "Invariant Language (Invariant Country)",
       "Name": ""
     }
   },
   {
     "Name": "AlloyPlan.png",
     "Language": {
       "Link": "http://localhost:8081/contentassets/3b16c17d494344de87c29324395d01bb/alloyplan.png",
       "DisplayName": "Invariant Language (Invariant Country)",
       "Name": ""
     }
   },
   {
     "Name": "AlloyPlanScreen.png",
     "Language": {
       "Link": "http://localhost:8081/contentassets/3b16c17d494344de87c29324395d01bb/alloyplanscreen.png",
       "DisplayName": "Invariant Language (Invariant Country)",
       "Name": ""
     }
   }
 ]
}
},
"extensions": {
"correlationId": "b37f03b1-7901-4386-a04a-78f55b85ba5c",
"cost": 104,
"costSummary": [
 "Content(104) = limit(100) + fields(4)"
]
}
}

Query a specific language

Returns the content items for that language.

query MyQuery {
  Content(locale: en, limit: 100) {
    items {
      Name
      Language {
        Link
        DisplayName
        Name
      }
    }
  }
}

Result

{
"data": {
 "Content": {
   "items": [
     {
       "Name": "Reporting Made Simple",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/reporting-made-simple/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Collaboration Made Simple",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/collaboration-made-simple/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Risk Management",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/risk-management-in-complex-projects/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Saves Bears",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/newworld-wildlife-fund-chooses-alloy/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Enhances Risk Management",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/alloy-plan-enhances-risk-management/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Top Collaboration Technology",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/alloy-meet-acclaimed-for-top-collaboration-technology/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Trek Selects Alloy Plan",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/trek-selects-alloy-plan/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Events",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Press Releases",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Michelle Hernandez",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/michelle-hernandez/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Todd Slayton",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/todd-slayton/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Robert Carlsson",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/robert-carlsson/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Fiona Miller",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/fiona-miller/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Amar Gupta",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/amar-gupta/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Management",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/management/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Contact us",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contact-us/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Become a reseller",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/become-a-reseller/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Whitepaper",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-track/download-whitepaper-alloy-track/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "News & Events",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Find a reseller",
       "Language": {
         "Link": "http://localhost:8081/en/how-to-buy/find-a-reseller/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Contacts",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Search",
       "Language": {
         "Link": "http://localhost:8081/en/search/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Meet",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-meet/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "About us",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Plan",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-plan/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Track",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-track/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "How to buy",
       "Language": {
         "Link": "http://localhost:8081/en/how-to-buy/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Meet jumbotron",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Plan teaser",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Track teaser",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Meet teaser",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Customer Zone",
       "Language": {
         "Link": "/en/customer-zone/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Reseller extranet",
       "Language": {
         "Link": "/en/customer-zone/reseller-extranet/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Start",
       "Language": {
         "Link": "http://localhost:8081/en/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Test page",
       "Language": {
         "Link": "http://localhost:8081/en/test-page/",
         "DisplayName": "English",
         "Name": "en"
       }
     }
   ]
 }
},
"extensions": {
 "correlationId": "b37f03b1-7901-4386-a04a-78f55b85ba5c",
 "cost": 104,
 "costSummary": [
   "Content(104) = limit(100) + fields(4)"
 ]
}
}

Query multiple languages and locales

Returns the content items for these languages.

query MyQuery {
  Content(locale: [en, fr], limit: 100, orderBy: {Language: {Name: DESC}}) {
    items {
      Name
      Language {
        Link
        DisplayName
        Name
      } 
    }
  }
}

Result

{
"data": {
 "Content": {
   "items": [
     {
       "Name": "Start fr134",
       "Language": {
         "Link": null,
         "DisplayName": "French",
         "Name": "fr"
       }
     },
     {
       "Name": "Reporting Made Simple",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/reporting-made-simple/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Collaboration Made Simple",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/collaboration-made-simple/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Risk Management",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/risk-management-in-complex-projects/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Saves Bears",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/newworld-wildlife-fund-chooses-alloy/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Enhances Risk Management",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/alloy-plan-enhances-risk-management/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Top Collaboration Technology",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/alloy-meet-acclaimed-for-top-collaboration-technology/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Trek Selects Alloy Plan",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/trek-selects-alloy-plan/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Events",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/events/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Press Releases",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/press-releases/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Michelle Hernandez",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/michelle-hernandez/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Todd Slayton",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/todd-slayton/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Robert Carlsson",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/robert-carlsson/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Fiona Miller",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/fiona-miller/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Amar Gupta",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/amar-gupta/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Management",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/management/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Contact us",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contact-us/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Become a reseller",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/become-a-reseller/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Whitepaper",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-track/download-whitepaper-alloy-track/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "News & Events",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/news-events/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Find a reseller",
       "Language": {
         "Link": "http://localhost:8081/en/how-to-buy/find-a-reseller/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Contacts",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/contacts/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Search",
       "Language": {
         "Link": "http://localhost:8081/en/search/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Meet",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-meet/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "About us",
       "Language": {
         "Link": "http://localhost:8081/en/about-us/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Plan",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-plan/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Track",
       "Language": {
         "Link": "http://localhost:8081/en/alloy-track/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "How to buy",
       "Language": {
         "Link": "http://localhost:8081/en/how-to-buy/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Meet jumbotron",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Plan teaser",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Track teaser",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Alloy Meet teaser",
       "Language": {
         "Link": null,
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Customer Zone",
       "Language": {
         "Link": "/en/customer-zone/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Reseller extranet",
       "Language": {
         "Link": "/en/customer-zone/reseller-extranet/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Start",
       "Language": {
         "Link": "http://localhost:8081/en/",
         "DisplayName": "English",
         "Name": "en"
       }
     },
     {
       "Name": "Test page",
       "Language": {
         "Link": "http://localhost:8081/en/test-page/",
         "DisplayName": "English",
         "Name": "en"
       }
     }
   ]
 }
},
"extensions": {
 "correlationId": "879f2ca9-4022-438c-a970-dc6abeda1fe2",
 "cost": 104,
 "costSummary": [
   "Content(104) = limit(100) + fields(4)"
 ]
}
}

Sync languages and locales

Enable the languages and locales you want the GraphQL schema to expose, then translate the Start page so Optimizely Graph syncs the language metadata into the schema. Without this step, the locale parameter cannot route queries to the language you expect.

  1. Go to Admin > Manage Website Languages.

  2. Enable the languages and locales you want to support.

  3. Choose the Start page on the Edit tab.

  4. Go to Tools > Language Settings.

  5. Check the languages or the locales you want to support.

  6. Go to the Sites tab and switch to the language or locales you want.

  7. Return to the Pages tab.

  8. Translate the Start page. Optimizely Graph syncs the content item immediately, and the GraphQL schema updates.

    📘

    Note

    • Enabling the language only on the Admin page does not have an effect. You must add the languages to the pages.
    • Translating the Start page is mandatory to sync the language to the GraphQL schema.