PHPackages                             mouf/html.utils.i18nweblibrary - 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. mouf/html.utils.i18nweblibrary

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

mouf/html.utils.i18nweblibrary
==============================

This implementation of a Weblibrary will load different JS files based on the current language used. Useful to load translation files in JS.

v3.0.0(11y ago)019.1k11MITPHPPHP &gt;=5.3.0

Since Oct 29Pushed 7y ago2 watchersCompare

[ Source](https://github.com/thecodingmachine/html.utils.i18nweblibrary)[ Packagist](https://packagist.org/packages/mouf/html.utils.i18nweblibrary)[ Docs](http://mouf-php.com/packages/mouf/html.utils.i18nweblibrary)[ RSS](/packages/mouf-htmlutilsi18nweblibrary/feed)WikiDiscussions 3.0 Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (1)

I18nWebLibrary
==============

[](#i18nweblibrary)

This special kind of [WebLibrary](http://mouf-php.com/packages/mouf/html.utils.weblibrarymanager/README.md)will load different Javascript files based on the current locale.

How does it work?
-----------------

[](#how-does-it-work)

You simply put a \[lang\] placeholder in the file name you want to load.

For instance:

`javascript/messages-[lang].js`

If the current locale used is French, the file requested will be `javascript/messages-fr.js`. If the current locale used is German, the file requested will be `javascript/messages-de.js`... If the current locale used is the default one, the file requested will be `javascript/messages-default.js`.

The locale is decided thanks to the `$languageDetection` property of `I18nWebLibrary`. This property must point to a class implementing [Fine's LanguageDetectionInterface interface](http://mouf-php.com/packages/mouf/utils.i18n.fine/doc/tutorial.md).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~218 days

Total

3

Last Release

4149d ago

Major Versions

2.0.x-dev → 3.0.x-dev2015-01-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (4 commits)")[![nguyenk](https://avatars.githubusercontent.com/u/2227554?v=4)](https://github.com/nguyenk "nguyenk (3 commits)")[![vaidiep](https://avatars.githubusercontent.com/u/2227695?v=4)](https://github.com/vaidiep "vaidiep (1 commits)")

---

Tags

i18nhtmlutils

### Embed Badge

![Health badge](/badges/mouf-htmlutilsi18nweblibrary/health.svg)

```
[![Health](https://phpackages.com/badges/mouf-htmlutilsi18nweblibrary/health.svg)](https://phpackages.com/packages/mouf-htmlutilsi18nweblibrary)
```

###  Alternatives

[symfony/string

Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way

1.8k724.1M827](/packages/symfony-string)[symfony/intl

Provides access to the localization data of the ICU library

2.6k199.8M1.1k](/packages/symfony-intl)[gettext/gettext

PHP gettext manager

70130.2M102](/packages/gettext-gettext)[gettext/languages

gettext languages with plural rules

7530.3M11](/packages/gettext-languages)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[coldtrick/translation_editor

Provide an easy way to edit translations

113.4k1](/packages/coldtrick-translation-editor)

PHPackages © 2026

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