PHPackages                             rivalex/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. rivalex/laravel-intl

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

rivalex/laravel-intl
====================

Easy to use internationalization functions for Laravel

1.2(4y ago)117.1k↓16.7%7[1 PRs](https://github.com/rivalex/laravel-intl/pulls)MITPHPPHP &gt;=8.0

Since Apr 21Pushed 1y ago2 watchersCompare

[ Source](https://github.com/rivalex/laravel-intl)[ Packagist](https://packagist.org/packages/rivalex/laravel-intl)[ RSS](/packages/rivalex-laravel-intl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (9)Versions (4)Used By (0)

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

[](#laravel-intl)

[![Latest Stable Version](https://camo.githubusercontent.com/4083c5e40af5d8289f41c5298e9cdb34a9c49acc94f3572ad26ae4c7d7c83c50/687474703a2f2f706f7365722e707567782e6f72672f726976616c65782f6c61726176656c2d696e746c2f76)](https://packagist.org/packages/rivalex/laravel-intl) [![Total Downloads](https://camo.githubusercontent.com/9577ac5d8d04953d0a75764710f897d83f013c0d68be4aa0a7d91ffc3245a6cf/687474703a2f2f706f7365722e707567782e6f72672f726976616c65782f6c61726176656c2d696e746c2f646f776e6c6f616473)](https://packagist.org/packages/rivalex/laravel-intl) [![Latest Unstable Version](https://camo.githubusercontent.com/f1b8ecef1868929eb28e69521b642327ffec83b8d1cc958638c4729563bcba56/687474703a2f2f706f7365722e707567782e6f72672f726976616c65782f6c61726176656c2d696e746c2f762f756e737461626c65)](https://packagist.org/packages/rivalex/laravel-intl) [![License](https://camo.githubusercontent.com/ae940af39c1828676c6f3850809d4db47642b14314e0388e2dece1c2d0aeb17c/687474703a2f2f706f7365722e707567782e6f72672f726976616c65782f6c61726176656c2d696e746c2f6c6963656e7365)](https://packagist.org/packages/rivalex/laravel-intl) [![PHP Version Require](https://camo.githubusercontent.com/3d4d5858e2bf1713134a145d030f826e15bbc5b4bb9fd69bf9ea958018f9bede/687474703a2f2f706f7365722e707567782e6f72672f726976616c65782f6c61726176656c2d696e746c2f726571756972652f706870)](https://packagist.org/packages/rivalex/laravel-intl)

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

### This is a fork of [Propaganistas/Laravel-Intl](https://github.com/Propaganistas/Laravel-Intl) Package tha is been archived. Thanks to [Propaganistas](https://github.com/Propaganistas) for grate Work!!!

[](#this-is-a-fork-of-propaganistaslaravel-intl-package-tha-is-been-archived-thanks-to-propaganistas-for-grate-work)

### 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 rivalex/laravel-intl
```

#### Laravel

[](#laravel)

If you don't use auto-discovery, open up your app config and add the Service Provider to the `$providers` array:

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

#### Adding Aliases

[](#adding-aliases)

Now add the alias

#### Adding Aliases

[](#adding-aliases-1)

Register facade on your `config/app.php` file.

```
'aliases' => [
   // ...
   'Country' => Rivalex\LaravelIntl\Facades\Country::class,
   'Currency' => Rivalex\LaravelIntl\Facades\Currency::class,
   'Language' => Rivalex\LaravelIntl\Facades\Language::class,
   'Number' => Rivalex\LaravelIntl\Facades\Number::class,
],
```

```
'aliases' => [
   // ...
   'Country' => Rivalex\LaravelIntl\Facades\Country::class,
   'Currency' => Rivalex\LaravelIntl\Facades\Currency::class,
   'Language' => Rivalex\LaravelIntl\Facades\Language::class,
   'Number' => Rivalex\LaravelIntl\Facades\Number::class,
],
```

#### Lumen

[](#lumen)

In `bootstrap/app.php`, register the Service Provider

```
$app->register(Rivalex\LaravelIntl\IntlServiceProvider::class);
```

### Usage

[](#usage)

> Note: **always** use the helper functions or Facades, or make use of dependency injection.

#### Country

[](#country)

Output localized country names.

```
use Rivalex\LaravelIntl\Facades\Country;

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

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

#### Currency

[](#currency)

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

```
use Rivalex\LaravelIntl\Facades\Currency;

// Application locale: nl
Currency::name('USD'); // Amerikaanse dollar
Currency::symbol('USD'); // $
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()->symbol('USD'); // $
currency(1000, 'USD'); // $1,000.00
currency()->all(); // ['USD' => 'US Dollar', 'EUR' => 'Euro', ...]
```

Parse localized values into native PHP numbers.

```
use Rivalex\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)

Just use `Illuminate\Support\Facades\Date`.

Additional methods are also available to output localized common date formats. E.g. `toShortDateString()`:

- Locale "en": 1/31/2018
- Locale "nl": 31-01-2018

```
use Illuminate\Support\Facades\Date;

$date = Date::now(); // or carbon()->now()

$date->toShortDateString();
$date->toMediumDateString();
$date->toLongDateString();
$date->toFullDateString();

$date->toShortTimeString();
$date->toMediumTimeString();
$date->toLongTimeString();
$date->toFullTimeString();

$date->toShortDatetimeString();
$date->toMediumDatetimeString();
$date->toLongDatetimeString();
$date->toFullDatetimeString();
```

#### Language

[](#language)

Output localized language names.

```
use Rivalex\LaravelIntl\Facades\Language;

// 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 Rivalex\LaravelIntl\Facades\Number;

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

```
// Application locale: fr
number(1000); // '1 000'
number()->percent('0.75'); // '75 %'
```

Parse localized values into native PHP numbers.

```
use Rivalex\LaravelIntl\Facades\Number;

// 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 `usingLocale()` method.

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

country()->usingLocale('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 remainder 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*.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~348 days

Total

3

Last Release

1517d ago

PHP version history (3 changes)1.0PHP &gt;=7.2

1.1PHP &gt;=7.3

1.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5c3130d9237407ef79b7512e965bf56275c61a1930739113046af35f580f539?d=identicon)[rivalex](/maintainers/rivalex)

---

Top Contributors

[![rivalex](https://avatars.githubusercontent.com/u/580591?v=4)](https://github.com/rivalex "rivalex (13 commits)")

---

Tags

laravelintlinternationalizationi18nl10n

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[aura/intl

The Aura Intl package provides internationalization tools, specifically message translation.

898.3M4](/packages/aura-intl)[tigrov/yii2-country

Country data for Yii2 using Intl extension and more.

151.1k](/packages/tigrov-yii2-country)

PHPackages © 2026

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