---
title: "Locale"
description: "Optimize policy statements with locale conditions to target specific content nodes using regex expressions. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/access-policies/conditions/locale"
---

# Locale

The `locale` condition allows you to constrain a policy statement so that it applies to content nodes that have a matching locale. This condition supports regular expressions, allowing you to focus in on a single path, sub paths or arbitrary matching path structures.

## Configuration

```
{
    "type": "locale",
    "config": {
        "locale": "{value regex}"
    }
}
```

## Samples

This policy document grants the Consumer role to all content with locale `es_ES`.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "locale",
            "config": {
                "locale": "es_ES"
            }
        }]
    }]
}
```

This uses a regex to match across all content in Spanish.

```
{
    "title": "My Sample Policy",
    "statements": [{
        "action": "grant",
        "roles": ["consumer"],
        "conditions": [{
            "type": "locale",
            "config": {
                "locale": "^es.*"
            }
        }]
    }]
}
```
