---
title: Locale
---

# Locale

<div class="documentation__toc"></div>

## Introduction

The locale service is a simple class that provides more information on a given `locale`.


## Basic Usage

You can use the locale utility by using the `\Anomaly\Streams\Platform\Support\Locale` class.

```php
use \Anomaly\Streams\Platform\Support\Locale;

$locale = new Locale('en');
```

### isRtl

The `isRtl` method returns if the locale is rtl or not.

```php
use \Anomaly\Streams\Platform\Support\Locale;

$locale = new Locale('en');

echo $locale->isRtl();
// false

echo $locale->isRtl('en');
// false
```

### name

The `name` method returns the translated locale name.

```php
use \Anomaly\Streams\Platform\Support\Locale;

$locale = new Locale('en');

echo $locale->name();
// English

echo $locale->name('en');
// English
```

### name

The `name` method returns the translated locale name.

```php
use \Anomaly\Streams\Platform\Support\Locale;

$locale = new Locale('en');

echo $locale->name();
// English

echo $locale->name('en');
// English
```
