Locale (language routing)
Describes how to use language routing.
Language routing is helpful for your search requests because it gets results faster and more accurately. It filters the content by routing to the specified language content. Language routing also uses linguistic processing of content when using thecontains operator on a field. See Optimizely Graph'slocale parameter.
In the Optimizely Graph .NET Client, theLocale andLocales methods are used for routing to the specified language or languages content.
Localemethod
LocalemethodThe parameters for the method can be anEPiServer.ContentGraph.Api.LocaleMode enum with two options:
ALL– For all indices.NEUTRAL– For standard index.
var query = queryBuilder.ForType<MyDocumentType>() .Locale(LocaleMode.NEUTRAL) .Fields(x=>x.Property).ToQuery().BuildQueries();Locales method
Locales methodUse this method if you want to route to some languages. The parameters are an array ofSystem.Globalization.CultureInfo.
var query = queryBuilder.ForType<MyDocumentType>() .Locales(new CultureInfo(“en”), new CultureInfo(“sv”)) .Fields(x=>x.Property).ToQuery().BuildQueries();Updated 23 days ago
