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

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

ozankurt/laravel-intl
=====================

Easy to use internationalization functions for Laravel

2.1.0(1y ago)31.6k↓50%2MITPHPPHP ^8.0CI failing

Since Mar 24Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

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

[](#laravel-intl)

Easy to use internationalization functions for Laravel 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). I will continue to maintain this package because I use it extensively in my own projects.

Feel free to provide pull requests. I will include them as fast as possible!

💥 Upgrade from Propaganistas/Laravel-Intl
-----------------------------------------

[](#-upgrade-from-propaganistaslaravel-intl)

Probably you see this message all the time when installing Composer dependencies:

> Package propaganistas/laravel-intl is abandoned, you should avoid using it. No replacement was suggested.

Don't worry! This is the replacement you seek.

In composer.json change requirement from `propaganistas/laravel-intl` to:

```
"ozankurt/laravel-intl": "^1.0",

```

I changed the namespace of this package. In your project search for `Propaganistas` and replace it with `Kurt`.

Thanks for migrating to this package!

### 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 ozankurt/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' => [
   ...
   OzanKurt\LaravelIntl\IntlServiceProvider::class,
],
```

#### Lumen

[](#lumen)

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

```
$app->register(OzanKurt\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 OzanKurt\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 OzanKurt\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 OzanKurt\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 OzanKurt\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 OzanKurt\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 OzanKurt\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

41

—

FairBetter than 89% of packages

Maintenance44

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 58% 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 ~163 days

Recently: every ~154 days

Total

12

Last Release

438d ago

Major Versions

1.1.2 → 2.0.02024-12-04

PHP version history (3 changes)1.0.x-devPHP &gt;=7.2.5

1.0.3PHP ^7.2|^8.0

2.0.0PHP ^8.0

### Community

Maintainers

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

---

Top Contributors

[![Propaganistas](https://avatars.githubusercontent.com/u/6680176?v=4)](https://github.com/Propaganistas "Propaganistas (40 commits)")[![OzanKurt](https://avatars.githubusercontent.com/u/8682003?v=4)](https://github.com/OzanKurt "OzanKurt (25 commits)")[![duxthefux](https://avatars.githubusercontent.com/u/6758162?v=4)](https://github.com/duxthefux "duxthefux (1 commits)")[![khaledelmahdi](https://avatars.githubusercontent.com/u/9323496?v=4)](https://github.com/khaledelmahdi "khaledelmahdi (1 commits)")[![mrelevance](https://avatars.githubusercontent.com/u/5429872?v=4)](https://github.com/mrelevance "mrelevance (1 commits)")[![Muhammadnm](https://avatars.githubusercontent.com/u/130706165?v=4)](https://github.com/Muhammadnm "Muhammadnm (1 commits)")

---

Tags

laravelintlinternationalizationi18nlanguagel10n

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[aplus/language

Aplus Framework Language Library

2351.7M15](/packages/aplus-language)[delight-im/i18n

Internationalization and localization for PHP

625.2k3](/packages/delight-im-i18n)[jrmajor/laravel-fluent

Fluent translations for Laravel

208.4k](/packages/jrmajor-laravel-fluent)[tigrov/yii2-country

Country data for Yii2 using Intl extension and more.

151.1k](/packages/tigrov-yii2-country)[jrmajor/fluent

Fluent localization system for PHP

2716.9k5](/packages/jrmajor-fluent)

PHPackages © 2026

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