PHPackages                             micropackage/internationalization - 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. micropackage/internationalization

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

micropackage/internationalization
=================================

Internationalization (i18n) wrapper for WordPress plugins, themes or libraries

1.0.2(3y ago)587.0k↑28.1%1[1 issues](https://github.com/micropackage/internationalization/issues)1GPL-3.0-or-laterPHPPHP &gt;=5.6

Since Jan 23Pushed 3y ago2 watchersCompare

[ Source](https://github.com/micropackage/internationalization)[ Packagist](https://packagist.org/packages/micropackage/internationalization)[ RSS](/packages/micropackage-internationalization/feed)WikiDiscussions develop Synced 2d ago

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

Internationalization
====================

[](#internationalization)

[![BracketSpace Micropackage](https://camo.githubusercontent.com/7a9f5ff780f859fdebce60d4e11572de05f86c42ef96b77967c24d7ea7d1e04b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f427261636b657453706163652d4d6963726f7061636b6167652d627269676874677265656e)](https://bracketspace.com)[![Latest Stable Version](https://camo.githubusercontent.com/32c8196f15a821ff91fe2d81589543e6fc2ea34a769d991cda469f6a2dfebe99/68747470733a2f2f706f7365722e707567782e6f72672f6d6963726f7061636b6167652f696e7465726e6174696f6e616c697a6174696f6e2f762f737461626c65)](https://packagist.org/packages/micropackage/internationalization)[![PHP from Packagist](https://camo.githubusercontent.com/0a1f71a2c874aec83cad802b8645c4c31a37442fb9ef33e42bfaa847cfb41475/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d6963726f7061636b6167652f696e7465726e6174696f6e616c697a6174696f6e2e737667)](https://packagist.org/packages/micropackage/internationalization)[![Total Downloads](https://camo.githubusercontent.com/6f82aa4a4ab3ef82a7526f1d26ef77612ee4eb4daec95962045a4d7a96b7d1f7/68747470733a2f2f706f7365722e707567782e6f72672f6d6963726f7061636b6167652f696e7465726e6174696f6e616c697a6174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/micropackage/internationalization)[![License](https://camo.githubusercontent.com/904b3abed83d47643d99c81ba9fb4faef31a13f9b31789d8185aaf7985a368ae/68747470733a2f2f706f7365722e707567782e6f72672f6d6963726f7061636b6167652f696e7465726e6174696f6e616c697a6174696f6e2f6c6963656e7365)](https://packagist.org/packages/micropackage/internationalization)

 [![Micropackage logo](https://camo.githubusercontent.com/9b9fc4f221b3683db4f9cc63e1ed92220004bbda118206d0a26d5ce6377d4d46/68747470733a2f2f627261636b657473706163652e636f6d2f6578747261732f6d6963726f7061636b6167652f6d6963726f7061636b6167652d736d616c6c2e706e67)](https://camo.githubusercontent.com/9b9fc4f221b3683db4f9cc63e1ed92220004bbda118206d0a26d5ce6377d4d46/68747470733a2f2f627261636b657473706163652e636f6d2f6578747261732f6d6963726f7061636b6167652f6d6963726f7061636b6167652d736d616c6c2e706e67)

🧬 About Internationalization
----------------------------

[](#-about-internationalization)

The Internationalization micropackage is an unified wrapper for both `load_plugin_textdomain` and `load_theme_textdomain` functions.

It can handle both theme and plugin language packs but also any other 3rd party library, like a translated Composer package.

The language file must follow the scheme: `{textdomain}-{locale_LOCALE}.mo`.

This package is compatible with [DocHooks library](https://github.com/micropackage/dochooks).

💾 Installation
--------------

[](#-installation)

```
composer require micropackage/internationalization
```

🕹 Usage
-------

[](#-usage)

Call the action manually:

```
use Micropackage\Internationalization\Internationalization;

add_action( 'init', [ new Internationalization( $textdomain, $full_language_dir_path ), 'load_translation' ] );
```

Using [DocHooks library](https://github.com/micropackage/dochooks):

```
Micropackage\DocHooks\Helper::hook( new Internationalization( $textdomain, $full_language_dir_path ) );
```

Retrieving full path to the directory:

```
$theme_language_dir  = get_template_directory() . '/languages';
$plugin_language_dir = plugin_dir_path( __FILE__ );
```

📦 About the Micropackage project
--------------------------------

[](#-about-the-micropackage-project)

Micropackages - as the name suggests - are micro packages with a tiny bit of reusable code, helpful particularly in WordPress development.

The aim is to have multiple packages which can be put together to create something bigger by defining only the structure.

Micropackages are maintained by [BracketSpace](https://bracketspace.com).

📖 Changelog
-----------

[](#-changelog)

[See the changelog file](./CHANGELOG.md).

📃 License
---------

[](#-license)

This software is released under MIT license. See the [LICENSE](./LICENSE) file for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity55

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

Total

3

Last Release

1106d ago

### Community

Maintainers

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

---

Top Contributors

[![jakubmikita](https://avatars.githubusercontent.com/u/18362490?v=4)](https://github.com/jakubmikita "jakubmikita (13 commits)")

---

Tags

bracketspacecomposer-libraryi18ninternationalizationmicropackage

### Embed Badge

![Health badge](/badges/micropackage-internationalization/health.svg)

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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