# Overview

Learn how to resolve the visitor's preferred locale.

This interface abstracts how the visitor's preferred locale is determined.

The framework integrations, such as the [Laravel](/reference/sdk/laravel/integration), [Symfony](/reference/sdk/symfony/integration), and [Drupal](/reference/sdk/drupal/integration) SDKs, consume it to serve content in the visitor's language. They resolve the locale from the framework automatically, but you can implement this interface to provide a custom source.

## Usage

Implement the interface to resolve the locale from your application:

```php
<?php
use Croct\Plug\LocaleResolver;

final class SessionLocaleResolver implements LocaleResolver
{
    public function getLocale(): ?string
    {
        return $_SESSION['locale'] ?? null;
    }
}
```
