PHPackages                             simotod/slim-multilanguage - 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. simotod/slim-multilanguage

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

simotod/slim-multilanguage
==========================

Multilanguage support for slim framework 2

172903PHP

Since Jan 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/SimoTod/slim-multilanguage)[ Packagist](https://packagist.org/packages/simotod/slim-multilanguage)[ RSS](/packages/simotod-slim-multilanguage/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

slim-multilanguage
==================

[](#slim-multilanguage)

This is an extension to the [SLIM framework](https://github.com/codeguy/Slim) vers.2 to enable simple route localization.

\##Installation Add dependecy to composer.json

```
    {
        "require": {
            "simotod/slim-multilanguage": "dev-master"
        }
    }
```

\##Usage

```
    require 'vendor/autoload.php';

	$defaultLanguage = "en";
	$availableLanguages = array("en", "it");

    $app = new \Slim\Slim();

	$app->add(new \SimoTod\Language\LanguageMiddleware($availableLanguages, $defaultLanguage));

	$app->get('/hello', function () use ($app) {
		//This route works for "/hello", "/en/hello", "/it/hello"
		if($app->locale->get() == "it") {
			echo "Ciao mondo!";
		} else {
			echo "Hello world!";
		}
	});

	$app->run();

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/499c3ec1a8f4178f10844d45031b401be825313793d5e588636ac2d13481c1f8?d=identicon)[SimoTod](/maintainers/SimoTod)

---

Top Contributors

[![SimoTod](https://avatars.githubusercontent.com/u/8427737?v=4)](https://github.com/SimoTod "SimoTod (2 commits)")

### Embed Badge

![Health badge](/badges/simotod-slim-multilanguage/health.svg)

```
[![Health](https://phpackages.com/badges/simotod-slim-multilanguage/health.svg)](https://phpackages.com/packages/simotod-slim-multilanguage)
```

###  Alternatives

[smarty-gettext/smarty-gettext

Gettext plugin enabling internationalization in Smarty Package files

752.5M8](/packages/smarty-gettext-smarty-gettext)[devaslanphp/auto-translate

Auto generate translation JSON files

6627.3k](/packages/devaslanphp-auto-translate)

PHPackages © 2026

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