---
title: Localize the visitor group criterion
slug: cms-11/dev-docs/localizing-the-visitor-group-criterion
docTags: 
createdAt: 2026-07-22T19:45:22.664Z
---

## VisitorGroupCriterion settings localization

If you want to localize `DisplayName`, `Category`, or `Description` when adding the `VisitorGroupCriterion` attribute, set the `LanguagePath` property. The property indicates a location in the language files where the Optimizely Content Management System (CMS) looks for matching keys. If you find the `DisplayName`, `Category`, or `Description` keys, the user interface uses the translation.

## Client-side localization

If you need a translated string on the client, you have to register the string you need in the `createUI` method, which can look similar to the following code:

```csharp
createUI: function (namingContainerPrefix, container, settings) {
  this.languageKeys = [
    '/xml/path/to/languageKey1',
    '/xml/path/to/languageKey2'
  ];
  this.prototype.createUI.apply(this, arguments);
}
```

You can access the translated value by using the following syntax:

```javascript
  validate: function (namingContainerPrefix, validationUtil) {
    ...
    this.translatedText['/xml/path/to/languageKey2']
    ...
  }
```

## Enumeration localization

If you use the `EnumSelectionFactory` add matching keys under the enumerators part of the language files and want the names translated. For an `enum` called `EPiServer.Sample.Criteria.Answer`, the keys can look similar to the following code:

```xml
<enums>
  <episerver>
    <sample>
      <criteria>
       <answer>
         <yes>Oh yes!</yes>
         <no>No way!</no>
       </answer>
      </criteria>
    </sample>
  </episerver>
</enums>
```
