PHPackages                             philasearch/i18n - 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. philasearch/i18n

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

philasearch/i18n
================

An i18n library for PHP

1.1.1(9y ago)019.6k4PHP

Since Sep 9Pushed 7y agoCompare

[ Source](https://github.com/philasearch/php-i18n)[ Packagist](https://packagist.org/packages/philasearch/i18n)[ Docs](https://github.com/philasearch/php-i18n)[ RSS](/packages/philasearch-i18n/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/f910946a6e8c0d56a97f4e80cf734ce4d3a00ef463dd09d13b15fa6d3d7a8e37/68747470733a2f2f706f7365722e707567782e6f72672f7068696c617365617263682f6931386e2f76657273696f6e2e737667)](https://packagist.org/packages/philasearch/i18n)[![Total Downloads](https://camo.githubusercontent.com/74579cae49bee74f884dd041df817c9cc8f16a46bcc5b85c12eb0d406570a9bd/68747470733a2f2f706f7365722e707567782e6f72672f7068696c617365617263682f6931386e2f646f776e6c6f6164732e737667)](https://packagist.org/packages/philasearch/i18n)[![Build Status](https://camo.githubusercontent.com/a17c07911378ab772360148c3a408b416973acb384544cbf3479033d638f65ed/68747470733a2f2f7472617669732d63692e6f72672f7068696c617365617263682f7068702d6931386e2e7376673f6272616e63683d76312e302e31)](https://travis-ci.org/philasearch/php-i18n)

PHP I18n
========

[](#php-i18n)

PHP I18n is a simple library for storing localized strings outside of your code.

Installing
----------

[](#installing)

Add the following require to your composer.json file.

```
{
    "require": {
        "philasearch/i18n": "1.1.*"
    }
}
```

Setup
-----

[](#setup)

### Language Folder

[](#language-folder)

In order to use i18n, you will need a language folder. By convention this folder is `config/locales`, however, you can choose whichever you want. In this folder, each supported language requires its own folder (`config/locales/en`, `config/locales/de`, ...).

### Use in PHP

[](#use-in-php)

You will most likely be using the I18n class in your own implementation, so you are just given a class which you can write a wrapper class for in your own code. All you need to do to create this class is give it the path to the language folder you decided on before.

```
