PHPackages                             clockworkgeek/magei18n - 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. clockworkgeek/magei18n

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

clockworkgeek/magei18n
======================

Detect translatable strings in Magento modules and automatically maintain locale/CSV files

0.0.2(9y ago)020GPL-2.0PHPPHP &gt;=5.3.0

Since May 28Pushed 9y ago3 watchersCompare

[ Source](https://github.com/clockworkgeek/MageI18n)[ Packagist](https://packagist.org/packages/clockworkgeek/magei18n)[ RSS](/packages/clockworkgeek-magei18n/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Magento Internationalization
============================

[](#magento-internationalization)

For module developers who want to keep track of locale strings. MageI18n works by statically scanning for uses of `->__("...")` method in PHP or `translate="..."` in XML files and adding to/removing from CSV files as necessary.

### Recommended Installation

[](#recommended-installation)

Make sure `$COMPOSER_HOME/vendor/bin` is in the include path. Usually this means adding `PATH=$PATH:~/.composer/vendor/bin` to your `.bashrc`file and logging out then in. Next just enter:

```
composer global require clockworkgeek/magei18n

```

### First use on an existing project

[](#first-use-on-an-existing-project)

Begin by testing in your module's project directory. The following command should list all translatable files in CSV format.

```
magei18n scan

```

If your module doesn't yet have a locale file then it can be generated like this:

```
mkdir -p app/locale/en_US
magei18n scan > app/locale/en_US/Example_Module.csv

```

If a locale file does exist and needs to be preserved then it is better to use:

```
magei18n update

```

The `update` command will remove any strings it cannot identify and add any which are missing. Those strings which are identified are not changed which will leave existing translations intact.

### Git workflow

[](#git-workflow)

MageI18n is intended to work in the background as a pre-commit hook. Add the command `magei18n git-diff` to any existing hook script. Alternatively, if one does not exist, enter:

```
cat > .git/hooks/pre-commit
#!/bin/sh
magei18n git-diff

chmod +x .git/hooks/pre-commit

```

This command will only add/remove strings which have changed with the latest commit. This is helpful if you are intentionally leaving some entries out of your module's locale file.

### Concerning multiple locales

[](#concerning-multiple-locales)

MageI18n will add newly found strings to **all** CSV files it can find. This is deliberate so that translators can see which entries still need to be fixed.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Total

3

Last Release

3384d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d3597688cd7718696e89cdb507c5312afef0a6b1540fa03f6e1edf163b30145?d=identicon)[clockworkgeek](/maintainers/clockworkgeek)

---

Top Contributors

[![clockworkgeek](https://avatars.githubusercontent.com/u/1078227?v=4)](https://github.com/clockworkgeek "clockworkgeek (10 commits)")

### Embed Badge

![Health badge](/badges/clockworkgeek-magei18n/health.svg)

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

###  Alternatives

[jms/translation-bundle

Puts the Symfony Translation Component on steroids

42510.8M63](/packages/jms-translation-bundle)[php-translation/extractor

Extract translations form the source code

1294.4M8](/packages/php-translation-extractor)[symfony/ux-translator

Exposes Symfony Translations directly to JavaScript.

26594.0k3](/packages/symfony-ux-translator)[skillshare/formatphp

Internationalize PHP apps. This library provides an API to format dates, numbers, and strings, including pluralization and handling translations.

8029.6k](/packages/skillshare-formatphp)[elegantly/laravel-translator

All on one translations management for Laravel

6216.9k](/packages/elegantly-laravel-translator)[leuchtfeuer/locate

Locate - The users country, preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. Locate also provides geo blocking for configurable pages in configurable countries.

1182.8k](/packages/leuchtfeuer-locate)

PHPackages © 2026

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