PHPackages                             kiumars-babolhavaeji/simple-php-translator - 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. kiumars-babolhavaeji/simple-php-translator

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

kiumars-babolhavaeji/simple-php-translator
==========================================

a package for translate names from a web resource

v1.0.1(3y ago)05MITPHP

Since Jul 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kbabolhavaeji/Easy-Transaltor)[ Packagist](https://packagist.org/packages/kiumars-babolhavaeji/simple-php-translator)[ RSS](/packages/kiumars-babolhavaeji-simple-php-translator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

SimpleTranslator
================

[](#simpletranslator)

SimpleTranslator is a lightweight and extensible PHP library for managing translations in multiple languages. It supports various file formats, dynamic configurations, caching, and features like pluralization and gender-specific translations.

---

Features
--------

[](#features)

- **Dynamic Configurations:** Customize settings via environment variables or config files.
- **Multi-Format Support:** JSON, YAML, and XML translation files are supported.
- **Fallback Language:** Automatically falls back to a default language if a translation file is missing.
- **Error Handling:** Gracefully handles missing or unreadable files and keys.
- **Caching:** Reduces repeated lookups by caching translations.
- **Pluralization and Gender-Specific Translations:** Adapts based on count and gender.

---

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

[](#installation)

The package is available on github and packagist, so for install and use this package you just need to install it by composer :

```
composer require kiumars-babolhavaeji/simple-php-translator

```

Usage

1. Configure the Library Set environment variables for dynamic configurations:

```
export TRANSLATOR_LANGUAGE=en
export TRANSLATOR_TYPE=.json
export TRANSLATOR_ROOT=/path/to/translations

```

2. Translation Example

```
use SimpleTranslator\Lang;

echo Lang::translate('hello'); // Output: Translation of 'hello'
echo Lang::translate('apple', ['count' => 2]); // Output: Apples (based on pluralization)
echo Lang::translate('actor', ['gender' => 'female']); // Output: Actress

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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

Every ~0 days

Total

2

Last Release

1387d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/kiumars-babolhavaeji-simple-php-translator/health.svg)

```
[![Health](https://phpackages.com/badges/kiumars-babolhavaeji-simple-php-translator/health.svg)](https://phpackages.com/packages/kiumars-babolhavaeji-simple-php-translator)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.0k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M491](/packages/illuminate-translation)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)[larswiegers/laravel-translations-checker

Make sure your laravel translations are checked and are included in all languages.

256423.2k2](/packages/larswiegers-laravel-translations-checker)

PHPackages © 2026

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