PHPackages                             dsi-agpt/zf2-assetic-i18n - 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. dsi-agpt/zf2-assetic-i18n

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

dsi-agpt/zf2-assetic-i18n
=========================

A few classes to add javascript internationalization feature to assetic

0.0.4(9y ago)01.4k1GPL-2.0PHPPHP &gt;=5.4

Since Sep 2Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dsi-agpt/zf2-assetic-i18n)[ Packagist](https://packagist.org/packages/dsi-agpt/zf2-assetic-i18n)[ RSS](/packages/dsi-agpt-zf2-assetic-i18n/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

zf2-assetic-i18n
================

[](#zf2-assetic-i18n)

A few classes to add javascript internationalization feature to assetic in zf2 context (via widmogrod/zf2-assetic-module).

### String management

[](#string-management)

Replace all your string by codes in js files and enclose it between curly brackets.

```
alert("{UC-03-TRS-MSG-01}");
```

Then, create a *text* entry anywhere in ZF2 configuration and convert your codes into *primary strings* whith gettext mark so that your string is loaded by your i18n tool (e.g. poedit).

```
'text' => array(
        'UC-03-TRS-MSG-01' => _("This an i18n test.")
    )
```

### Configuration requirements

[](#configuration-requirements)

Add an *available\_language* entry under the translator key of your configuration.

```
'translator' => array(
  'available_languages' => array(
      'fr_FR',
      'en_US',
      'de_DE'
  ),
```

### What the module does

[](#what-the-module-does)

#### At build time

[](#at-build-time)

All the javascript collections of your assetic configuration will be expanded in th following way : asset\_js gives en\_US\_asset\_js, fr\_FR\_asset\_js etc. Each of them receives a filter that performs replacement of codes by primary strings and translation of primary strings into the target language.

#### At runtime

[](#at-runtime)

HeadScript and InlineScript view helpers behaviour is modified in order to prefix the javascript's files path with the current locale. The interest of this approach is that no translation is performed at runtime. Internationalized javascript files are served as static resources.

### Issue

[](#issue)

*ServiceLocatorFactory* module had to be introduced to get the service locator in alternative ViewHelperStrategy. But it's a bad practice.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

Total

2

Last Release

3357d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3ca940365ce58cea1f8b4891597d850b0cd3220072454f915b6b8e798990930?d=identicon)[j-dornbusch](/maintainers/j-dornbusch)

---

Top Contributors

[![elchristo](https://avatars.githubusercontent.com/u/2795836?v=4)](https://github.com/elchristo "elchristo (8 commits)")

---

Tags

i18nasseticzf2

### Embed Badge

![Health badge](/badges/dsi-agpt-zf2-assetic-i18n/health.svg)

```
[![Health](https://phpackages.com/badges/dsi-agpt-zf2-assetic-i18n/health.svg)](https://phpackages.com/packages/dsi-agpt-zf2-assetic-i18n)
```

###  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

70530.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)
