PHPackages                             borges/localization - 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. borges/localization

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

borges/localization
===================

Easy i18n localization for Laravel 4.

0.1.0(12y ago)7393MITPHPPHP &gt;=5.3.0

Since Dec 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mapb1990/Laravel-Localization-Module)[ Packagist](https://packagist.org/packages/borges/localization)[ Docs](https://github.com/mapb1990/Laravel-Localization-Module/)[ RSS](/packages/borges-localization/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel Localization
====================

[](#laravel-localization)

Easy i18n localization for Laravel 4.

Instalation
-----------

[](#instalation)

In app/config/app.php, replace the following entry from the `providers` key:

```
'Illuminate\Translation\TranslationServiceProvider',

```

with:

```
'Borges\Localization\LocalizationServiceProvider',

```

and add the next facade in the `aliases` key:

```
'Locale'          => 'Borges\Localization\Facades\Locale',

```

You may publish the package's configuration if you so choose, using artisan CLI:

```
php artisan config:publish borges/localization

```

Usage
-----

[](#usage)

### Translation

[](#translation)

This translations package is designed to adapt to your workflow. Translations are accessed just like in Laravel, with replacements and pluralization working as expected. The only difference is that languages ​​can be inherited.

#### Example

[](#example)

**app/en/app.php**

```
return array(
    'color'     => 'Colour',
    'hello'     => 'Hello',
    'welcome'   => 'Welcome',
    'another-string' => 'Another String'
);
```

**app/en-US/app.php**

```
return array(
    'color'     => 'Color'
);
```

**app/pt/app.php**

```
return array(
    'color'     => 'Cor',
    'hello'     => 'Olá',
    'welcome'   => 'Bem-vindo'
);
```

```
App::setLocale('en');
echo Lang::get('app.welcome');  # prints 'Welcome'
echo Lang::get('app.color');  # prints 'Colour'
echo Lang::get('app.hello');  # prints 'Hello'

App::setLocale('en-US');
echo Lang::get('app.welcome');  # prints 'Welcome'
echo Lang::get('app.color');  # prints 'Color'
echo Lang::get('app.hello');  # prints 'Hello'

App::setLocale('pt');
echo Lang::get('app.welcome');  # prints 'Bem-vindo'
echo Lang::get('app.color');  # prints 'Cor'
echo Lang::get('app.hello');  # prints 'Olá'

echo Lang::get('another-string');  # prints 'Another String' if 'useDefault' is true or else prints 'another-string'
```

### Another resources (dates, numbers, ...)

[](#another-resources-dates-numbers-)

This package provides a local resource formatter for dates and numbers.

#### Example

[](#example-1)

```
App::setLocale('en');
echo Locale::number(1234567.890); # prints '1, 234, 567.89'
echo Locale::int(1234567.890); # prints '1, 234, 568'
echo Locale::date(Carbon\Carbon::now()); # prints 'Tuesday, December 17, 2013'

App::setLocale('en-US');
echo Locale::number(1234567.890); # prints '1, 234, 567.89'
echo Locale::int(1234567.890); # prints '1, 234, 568'
echo Locale::date(Carbon\Carbon::now()); # prints 'Tuesday, December 17, 2013'

App::setLocale('pt');
echo Locale::number(1234567.890); # prints '1 234 567,89'
echo Locale::int(1234567.890); # prints '1 234 568'
echo Locale::date(Carbon\Carbon::now()); # prints '17 de Dezembro de 2013'
```

### Helpers

[](#helpers)

This package provides a collection of helpers functions. See [helpers.php](https://github.com/mapb1990/Laravel-Localization-Module/blob/master/src/Borges/Localization/helpers.php).

Changelog
---------

[](#changelog)

### v0.1.0 (17-12-2013)

[](#v010-17-12-2013)

- Initial release

Support or Contact
------------------

[](#support-or-contact)

If you have any questions or found any bug, please contact me via [twitter](https://twitter.com/mapb_1990) or [github issues system](https://github.com/mapb1990/Laravel-Localization-Module/issues).

[![Support via PayPal](https://camo.githubusercontent.com/1c4c2a63b268ab949717893dda9628735444f61b8eb8eece283a534338b5b0e5/68747470733a2f2f7261776769746875622e636f6d2f63687269732d2d2d2f446f6e6174696f6e2d4261646765732f6d61737465722f70617970616c2e6a706567)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=SBTFEMJL6LXPG&lc=PT&item_name=borges%2flocalization%20package&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4523d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cc3a63ea1e69b0c217db813e577406d86316710e1f09a02f10753df56939063?d=identicon)[mapb\_1990](/maintainers/mapb_1990)

---

Top Contributors

[![mapb1990](https://avatars.githubusercontent.com/u/1731701?v=4)](https://github.com/mapb1990 "mapb1990 (9 commits)")

---

Tags

laravellocalizationi18ntranslationborges

### Embed Badge

![Health badge](/badges/borges-localization/health.svg)

```
[![Health](https://phpackages.com/badges/borges-localization/health.svg)](https://phpackages.com/packages/borges-localization)
```

###  Alternatives

[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[smousss/laravel-globalize

Make Laravel projects translatable in a matter of seconds!

2266.3k](/packages/smousss-laravel-globalize)

PHPackages © 2026

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