PHPackages                             puresoft/easy-lang - 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. puresoft/easy-lang

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

puresoft/easy-lang
==================

A simple PHP class for creating pages with multiple languages

v2.1.1(10y ago)0321MITPHPPHP &gt;=5.4.0

Since Mar 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/J-TAG/easy-lang)[ Packagist](https://packagist.org/packages/puresoft/easy-lang)[ Docs](https://github.com/J-TAG/easy-lang)[ RSS](/packages/puresoft-easy-lang/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (4)Used By (0)

EasyLang
========

[](#easylang)

A simple PHP class for creating pages with multiple languages

By using this class you can use multiple languages in PHP pages. Languages are saved in a UTF-8 `.ini` file and will load by their language short names. This class provided with Getters and Setters, so you can easily customize it.

Installation
============

[](#installation)

You can simply download or clone this project or if you want, you can install EasyLang through composer: `composer require puresoft/easy-lang`

Usage:
======

[](#usage)

First include EasyLang file:

`require_once 'easylang.php';`

Then you should make a `.ini` file which can be found in `languages` folder of demo and name it as its language short name. For example we create a file with name of `en.ini` for English language.

Now we can make an object from EasyLang like this:

```
$languages_path = 'languages/'; // Don't forget '/' at the end of path

$language_short_name = 'en';

$is_rtl = false; // Some languages are in right to left direction. This will be useful if we store this property in EasyLang for later use_

$translate = new EasyLang( $languages_path, $language_short_name, $is_rtl_ );
```

So, EasyLang will find a file with name of `en.ini` in `languages` folder.

Inside that `.ini` file we have a constant and a translate like this:

`MY_TITLE = "Here is my page Title"`

Now we can use this constant like this:

`echo $translate->getTranslate( 'MY_TITLE' );`

Demo Script
===========

[](#demo-script)

There is an `index.php` in project that contains an example to show how to use EasyLang in your code.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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 ~2 days

Total

3

Last Release

3706d ago

### Community

Maintainers

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

---

Top Contributors

[![j-tag](https://avatars.githubusercontent.com/u/3483320?v=4)](https://github.com/j-tag "j-tag (18 commits)")

---

Tags

phplocalizationi18nlanguagetranslateeasymulti-language

### Embed Badge

![Health badge](/badges/puresoft-easy-lang/health.svg)

```
[![Health](https://phpackages.com/badges/puresoft-easy-lang/health.svg)](https://phpackages.com/packages/puresoft-easy-lang)
```

###  Alternatives

[gettext/languages

gettext languages with plural rules

7530.3M10](/packages/gettext-languages)[punic/punic

PHP-Unicode CLDR

1542.9M29](/packages/punic-punic)[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[fisharebest/localization

A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.

3191.1k2](/packages/fisharebest-localization)[delfimov/translate

Easy to use i18n translation PHP class for multi-language websites

1777.1k](/packages/delfimov-translate)[jrmajor/fluent

Fluent localization system for PHP

2716.9k5](/packages/jrmajor-fluent)

PHPackages © 2026

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