---
title: Locale (language routing)
slug: graph/docs/locale-language-routing
docTags: 
createdAt: 2026-07-30T20:30:19.480Z
---

:::hint{type="info"}
**Note**
Optimizely Graph .NET Source SDK is optimized for CMS 12. Learn more about the [C# SDK for CMS 13](docId\:ZQSzbbACAIXmzMLIe4NIk).
:::

Language routing returns search results faster and more accurately by restricting the query to a specific language's content. Language routing also applies linguistic processing when you use the `contains` operator on a field. See the [locale parameter](docId\:sNcLLcLYgWv_QVb0Mtqus) in Optimizely Graph.

Optimizely Graph .NET Client provides the `Locale` and `Locales` methods to route queries to content in one or more specific languages.

## `Locale` method

The `Locale` method takes one parameter: an `EPiServer.ContentGraph.Api.LocaleMode` enum value. The enum defines two values:

- `ALL` – Routes the query to all language indices.
- `NEUTRAL` – Routes the query to the standard (non-localized) index.

```csharp
var query = queryBuilder
    .ForType<MyDocumentType>()
    .Locale(LocaleMode.NEUTRAL)
    .Fields(x => x.Property)
    .ToQuery()
    .BuildQueries();
```

## `Locales` method

Use this method to route to multiple languages. The parameter is an array of `System.Globalization.CultureInfo` values.

```csharp
var query = queryBuilder
    .ForType<MyDocumentType>()
    .Locales(new CultureInfo("en"), new CultureInfo("sv"))
    .Fields(x => x.Property)
    .ToQuery()
    .BuildQueries();
```
