PHPackages                             jelix/simplelocalization - 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. jelix/simplelocalization

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

jelix/simplelocalization
========================

A simple class to manipulate localized messages

v1.7.2(3y ago)0116.2k↓20.9%2LGPL-2.1PHPPHP &gt;=7.4.0

Since Nov 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/jelix/simplelocalization)[ Packagist](https://packagist.org/packages/jelix/simplelocalization)[ Docs](http://jelix.org)[ RSS](/packages/jelix-simplelocalization/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (4)Used By (2)

This is a simple class to load and give translated strings, for localization.

It was formerly used in the Jelix Framework.

installation
============

[](#installation)

You can install it from Composer. In your project:

```
composer require "jelix/simplelocalization"

```

Usage
=====

[](#usage)

First create lang files. You can store strings of all lang into a single file, or in one file per lang. Each file is a PHP array, and each strings have a key.

Example. Here is a file `translation.en.php` for english strings:

```
