PHPackages                             webident/laravel-intl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. webident/laravel-intl

ActiveLibrary[Localization &amp; i18n](/categories/localization)

webident/laravel-intl
=====================

Easy to use internationalization functions for Laravel

018↓92.3%PHP

Since Jun 4Pushed 1y agoCompare

[ Source](https://github.com/mihaitatomir/laravel-intl)[ Packagist](https://packagist.org/packages/webident/laravel-intl)[ RSS](/packages/webident-laravel-intl/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Intl
============

[](#laravel-intl)

[![Build Status](https://camo.githubusercontent.com/8ae7fafec48f03e9b5cc5f39486a5c09c2f9f4642e03b127e1a3814309c2b617/68747470733a2f2f7472617669732d63692e6f72672f7765626964656e742f4c61726176656c2d496e746c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/webident/Laravel-Intl)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e27db7428a047dd858096bf2c110473be0c1281d2eff16f6dafd06f455362936/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5765626964656e742f4c61726176656c2d496e746c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Webident/Laravel-Intl/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/63fb69d55b541ed3dff6c362fd48296df0d0fc5a844fa91e0a2956ff0e81e25d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f5765626964656e742f4c61726176656c2d496e746c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Webident/Laravel-Intl/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/856b9b93690f84198bbb92956ad5feeac23861b11ee918311122fd28c4071b35/68747470733a2f2f706f7365722e707567782e6f72672f7765626964656e742f6c61726176656c2d696e746c2f762f737461626c65)](https://packagist.org/packages/webident/laravel-intl)[![Total Downloads](https://camo.githubusercontent.com/47f0e6a57b6bc8a8adb647571d10a9b08a31819f40267619772a0341af819836/68747470733a2f2f706f7365722e707567782e6f72672f7765626964656e742f6c61726176656c2d696e746c2f646f776e6c6f616473)](https://packagist.org/packages/webident/laravel-intl)[![License](https://camo.githubusercontent.com/d162a483ea6bc993a4b23cb1deded5af0c1b9338dcc529fc162c96b443e9a5f7/68747470733a2f2f706f7365722e707567782e6f72672f7765626964656e742f6c61726176656c2d696e746c2f6c6963656e7365)](https://packagist.org/packages/webident/laravel-intl)

Easy to use internationalization functions for Laravel 5 based on various libraries for easy retrieval of localized values and formatting of numeric values into their localized patterns.

### Overview

[](#overview)

- [Installation](#installation)
- [Usage](#usage)
    - [Country](#country)
    - [Currency](#currency)
    - [Date](#date)
    - [Language](#language)
    - [Number](#number)
- [Changing locales](#changing-locales)

### Installation

[](#installation)

Run the following command to install the latest version of the package

```
composer require webident/laravel-intl
```

In your app config, add the Service Provider to the `$providers` array

```
'providers' => [
   ...
   Webident\LaravelIntl\IntlServiceProvider::class,
],
```

### Usage

[](#usage)

> Note: **always** use the helper functions or Facades.

#### Country

[](#country)

Output localized country names.

```
use Webident\LaravelIntl\Facades\Country;

// Application locale: en
Country::name('US'); // United States
Country::currency('US'); // USD
Country::all(); // ['US' => 'United States', 'BE' => 'Belgium', ...]

// Application locale: nl
Country::name('US'); // Verenigde Staten
Country::all(); // ['US' => 'Verenigde Staten', 'BE' => 'België', ...]
```

```
// Application locale: en
country('US'); // United States
country()->currency('US'); // USD
country()->all(); // ['US' => 'United States', 'BE' => 'Belgium', ...]
```

#### Currency

[](#currency)

Output localized currency names and format currency amounts into their localized pattern.

```
use Webident\LaravelIntl\Facades\Currency;

// Application locale: en
Currency::name('USD'); // US Dollar
Currency::symbol('USD'); // $
Currency::format(1000, 'USD'); // $1,000.00
Currency::formatAccounting(-1234, 'USD'); // ($1,234.00)
Currency::all(); // ['USD' => 'US Dollar', 'EUR' => 'Euro', ...]

// Application locale: nl
Currency::name('USD'); // Amerikaanse dollar
Currency::format(1000, 'USD'); // $ 1.000,00
Currency::formatAccounting(-1234, 'USD'); // (US$ 1.234,00)
Currency::all(); // ['USD' => 'Amerikaanse dollar', 'EUR' => 'Euro', ...]
```

```
// Application locale: en
currency('USD'); // US Dollar
currency(1000, 'USD'); // $1,000.00
currency()->symbol('USD'); // $
currency()->all(); // ['USD' => 'US Dollar', 'EUR' => 'Euro', ...]
```

Parse localized values into native PHP numbers.

```
use Webident\LaravelIntl\Facades\Currency;

// Application locale: nl
Currency::parse('€ 1.234,50'); // 1234.5
```

```
// Application locale: nl
currency()->parse('€ 1.234,50'); // 1234.5
```

#### Date

[](#date)

Output localized dates.

Use the Facade (`Webident\LaravelIntl\Facades\Carbon`) or the helper function (`carbon()`) as if it were [Carbon](http://carbon.nesbot.com).

#### Language

[](#language)

Output localized language names.

```
use Webident\LaravelIntl\Facades\Language;

// Application locale: en
Language::name('en'); // English
Language::all(); // ['en' => 'English', 'nl' => 'Dutch', ...]

// Application locale: nl
Language::name('en'); // Engels
Language::all(); // ['en' => 'Engels', 'nl' => 'Nederlands', ...]
```

```
// Application locale: en
language('en'); // English
language()->all(); // ['en' => 'English', 'nl' => 'Dutch', ...]
```

#### Number

[](#number)

Output localized numeric values into their localized pattern.

```
use Webident\LaravelIntl\Facades\Number;

// Application locale: en
Number::format(1000); // 1,000
Number::percent(75); // 75%

// Application locale: fr
Number::format(1000); // 1 000
Number::percent(75); // 75 %
```

```
// Application locale: en
number(1000); // 1,000
number()->percent(75); // 75%
```

Parse localized values into native PHP numbers.

```
use Webident\LaravelIntl\Facades\Number;

// Application locale: fr
Number::parse('1 000'); // 1000
Number::parse('1,5'); // 1.5
```

```
// Application locale: fr
number()->parse('1 000'); // 1000
number()->parse('1,5'); // 1.5
```

### Changing locales

[](#changing-locales)

Ever feel the need to use a locale other than the current application locale? You can temporarily use another locale by using the `forLocale()` method.

```
country()->name('US'); // United States

country()->forLocale('nl', function($country) {
    return $country->name('US');
}); // Verenigde Staten

country()->name('US'); // United States
```

Alternatively, you can force each component individually to the preferred locale for the rest of the application by calling the `setLocale()` on the helper function or Facade. Usually you'd set this in the `boot()` method of a *ServiceProvider*.

```
country()->setLocale($locale);
currency()->setLocale($locale);
carbon()->setLocale($locale);
language()->setLocale($locale);
number()->setLocale($locale);

country()->setFallbackLocale($locale);
currency()->setFallbackLocale($locale);
carbon()->setFallbackLocale($locale);
language()->setFallbackLocale($locale);
number()->setFallbackLocale($locale);
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1097f283d362185dcec9ddc385b6fc91958c988d1d98a97236aa2a12ce30c104?d=identicon)[mihaitatomir](/maintainers/mihaitatomir)

### Embed Badge

![Health badge](/badges/webident-laravel-intl/health.svg)

```
[![Health](https://phpackages.com/badges/webident-laravel-intl/health.svg)](https://phpackages.com/packages/webident-laravel-intl)
```

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
