PHPackages                             soderlind/a-faster-load-textdomain - 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. [Caching](/categories/caching)
4. /
5. soderlind/a-faster-load-textdomain

AbandonedWordpress-plugin[Caching](/categories/caching)

soderlind/a-faster-load-textdomain
==================================

A faster load\_textdomain

2.3.2(1y ago)91.5k1[1 PRs](https://github.com/soderlind/a-faster-load-textdomain/pulls)GPL-2.0-or-laterPHP

Since Jul 25Pushed 1y ago2 watchersCompare

[ Source](https://github.com/soderlind/a-faster-load-textdomain)[ Packagist](https://packagist.org/packages/soderlind/a-faster-load-textdomain)[ Docs](https://github.com/soderlind/a-faster-load-textdomain)[ Fund](https://paypal.me/PerSoderlind)[ RSS](/packages/soderlind-a-faster-load-textdomain/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (23)Used By (0)

A Faster load\_textdomain
=========================

[](#a-faster-load_textdomain)

> **NOTE** This plugin is not needed if you are running WordPress 6.5 or later, as the functionality [is built into WordPress core](https://make.wordpress.org/core/2024/02/27/i18n-improvements-6-5-performant-translations/). If you need to generate translation in the new `.l10n.php` format, use the [Performant Translations](https://wordpress.org/plugins/performant-translations/) plugin instead.

This is a WordPress plugin that caches the .mo file as an PHP array, and [include](https://www.php.net/manual/en/function.include.php) the array instead of the .mo file. In theory, nothing is faster in PHP than loading and executing another PHP file.

Installation
------------

[](#installation)

Either (recommended):

- Download the plugin files and extract `a-faster-load-textdomain.php` and `class-afld-cachehandler.php` to the `wp-content/mu-plugins` directory.

Or:

- Search for "[A faster load\_textdomain](https://wordpress.org/plugins/a-faster-load-textdomain/)" and install with the WordPress plugin installer.
- (Network) Activate the plugin through the 'Plugins' menu in WordPress.

It's also possible to install the plugin via Composer: `composer require soderlind/a-faster-load-textdomain`

How It Works
------------

[](#how-it-works)

If you have a plugin or theme that loads a textdomain, e.g. `load_textdomain( 'textdomain', $path_to_mo_file )`, then this plugin will:

1. Look for a PHP version of the .mo file in `WP_CONTENT_DIR . '/cache/a-faster-load-textdomain'` directory.
2. If the PHP version exists, [include](https://www.php.net/manual/en/function.include.php) the file.
3. If the PHP version doesn't exist, load the .mo file, and save the file as an PHP array in `wp-content/cache/a-faster-load-textdomain/` directory.

 ```
graph TD
    A[Start] --> B{Look for PHP version of .mo file in cache directory}
    B -->|Exists| C[Include the PHP file]
    B -->|Doesn't Exist| D[Load the .mo file]
    D --> E[Save the file as a PHP array in cache directory]
    C --> F[End]
    E --> F[End]
```

      Loading The localized PHP array can be cached via [PHP OPcache](http://blog.jpauli.tech/2015-03-05-opcache-html/). If you have PHP OPcache enabled, then the localized PHP array will be cached in memory, and the PHP file will not be parsed again.

Filters
-------

[](#filters)

### `a_faster_load_textdomain_cache_path`

[](#a_faster_load_textdomain_cache_path)

Change the cache path, default is `WP_CONTENT_DIR . '/cache/a-faster-load-textdomain'`.

```
add_filter( 'a_faster_load_textdomain_cache_path', function( $path ) {
	return WP_CONTENT_DIR . '/cache/my-cache';
} );
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

Credits
-------

[](#credits)

Orignal file:

Copyright and License
---------------------

[](#copyright-and-license)

This plugin is copyright © 2023 [Per Soderlind](http://soderlind.no).

This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See [LICENSE](LICENSE) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

Recently: every ~56 days

Total

19

Last Release

668d ago

Major Versions

1.0.3 → 2.0.02023-08-10

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1649452?v=4)[Per Søderlind](/maintainers/soderlind)[@soderlind](https://github.com/soderlind)

---

Top Contributors

[![soderlind](https://avatars.githubusercontent.com/u/1649452?v=4)](https://github.com/soderlind "soderlind (90 commits)")

---

Tags

cachegettextlocalizationwordpress-plugin

### Embed Badge

![Health badge](/badges/soderlind-a-faster-load-textdomain/health.svg)

```
[![Health](https://phpackages.com/badges/soderlind-a-faster-load-textdomain/health.svg)](https://phpackages.com/packages/soderlind-a-faster-load-textdomain)
```

###  Alternatives

[predis/predis

A flexible and feature-complete Redis/Valkey client for PHP.

7.8k305.7M2.4k](/packages/predis-predis)[snc/redis-bundle

A Redis bundle for Symfony

1.0k39.4M67](/packages/snc-redis-bundle)[react/cache

Async, Promise-based cache interface for ReactPHP

444112.4M40](/packages/react-cache)[wp-media/wp-rocket

Performance optimization plugin for WordPress

7431.3M3](/packages/wp-media-wp-rocket)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[colinmollenhour/php-redis-session-abstract

A Redis-based session handler with optimistic locking

6325.6M14](/packages/colinmollenhour-php-redis-session-abstract)

PHPackages © 2026

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