Title: Cached l10n
Author: lavoiesl
Published: <strong>April 23, 2013</strong>
Last modified: April 23, 2013

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/cached-l10n.svg)

# Cached l10n

 By [lavoiesl](https://profiles.wordpress.org/lavoiesl/)

[Download](https://downloads.wordpress.org/plugin/cached-l10n.0.2.2.zip)

 * [Details](https://wordpress.org/plugins/cached-l10n/#description)
 * [Reviews](https://wordpress.org/plugins/cached-l10n/#reviews)
 *  [Installation](https://wordpress.org/plugins/cached-l10n/#installation)
 * [Development](https://wordpress.org/plugins/cached-l10n/#developers)

 [Support](https://wordpress.org/support/plugin/cached-l10n/)

## Description

Upon inspection using xhProf, I realized that the PHP implementation loading the
MO files is really slow.
 From my tests, about 25% to 40% of the time WordPress 
spends rendering the page is actually spent locating, parsing and merging all the
translation files.

This plugin works by caching the whole $l10n variable holding all the text domains
and overridding the `load_textdomain`.

Caching is done using serialize and written to `wp-content/uploads/l10n.pson`.
 
Be sure to regenerate the cache if a .mo changes.

#### TODO

 * Provide a better UI page

### Speed comparison

Comparing WordPress Gettext loading vs this plugin.

Using the average response time of:
 siege -c 1 -r 100 -b http://localhost/

Vanilla: Fresh install of WordPress
 Common: WPML, Types, Views, and Gravity Forms
Total Cache: Common + Total Cache (APC object/database cache, no page cache) BuddyPress:
BP-Registration-Options, BP Show Friends, BuddyPress, BuddyPress Activity Plus, 
Gravity Forms, Invite Anyone, U BuddyPress Forum Attachment, U BuddyPress Forum 
Editor, User Switching

    ```
                Vanilla         Common          Total Cache     BuddyPress
    Native      202 ms          565 ms          478 ms          567 ms
    Cached      193 ms (-5%)    322 ms (-43%)   333 ms (-30%)   431 ms (-24%)
    ```

## Installation

wp-content/uploads/l10n.pson must be writable

 1. Activate plugin
 2. Go to plugin’s settings page
 3. Hit the regenerate button
 4. `WP_DEBUG` must be false

## Reviews

![](https://secure.gravatar.com/avatar/bb844c0fce60afa149e2b47a3fcac3690dc67689abdf1575e994a823894bdec3?
s=60&d=retro&r=g)

### 󠀁[The idea is good!](https://wordpress.org/support/topic/the-idea-is-good-2/)󠁿

 [lars Portman](https://profiles.wordpress.org/webppower/) June 22, 2020

hope update it someday! because basic idea is good for performance website.

 [ Read all 3 reviews ](https://wordpress.org/support/plugin/cached-l10n/reviews/)

## Contributors & Developers

“Cached l10n” is open source software. The following people have contributed to 
this plugin.

Contributors

 *   [ lavoiesl ](https://profiles.wordpress.org/lavoiesl/)

[Translate “Cached l10n” into your language.](https://translate.wordpress.org/projects/wp-plugins/cached-l10n)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/cached-l10n/), check
out the [SVN repository](https://plugins.svn.wordpress.org/cached-l10n/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/cached-l10n/) by
[RSS](https://plugins.trac.wordpress.org/log/cached-l10n/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.2.2

 * Refactored code
 * Fixed small issues

#### 0.2

 * Refactored code
 * Added some detection when translations change

#### 0.1

 * Orignal submission

## Meta

 *  Version **0.2.2**
 *  Last updated **13 years ago**
 *  Active installations **10+**
 *  WordPress version ** 3.0.1 or higher **
 *  Tested up to **3.5.2**
 *  [Advanced View](https://wordpress.org/plugins/cached-l10n/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  3 5-star reviews     ](https://wordpress.org/support/plugin/cached-l10n/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/cached-l10n/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/cached-l10n/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/cached-l10n/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/cached-l10n/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cached-l10n/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/cached-l10n/reviews/)

## Contributors

 *   [ lavoiesl ](https://profiles.wordpress.org/lavoiesl/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/cached-l10n/)