wp-i18n
Skill4 starsChanged 3 days agoMITView on GitHub
Make WordPress code translation-ready. Use when writing any user-facing string, adding text domains, fixing untranslated output, or preparing a plugin/theme for localization. Enforces the i18n escaping matrix, translators comments, numbered placeholders, and text-domain rules.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- bienhoang/wp-pro-maxtheir own version, first seen Oct 11, 2026
- shinobiashi/claude-skillstheir own version, first seen Oct 8, 2026
- morrealev/wordpress-managertheir own version, first seen Mar 1, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- morrealev/wordpress-manager★ 8same name
- bienhoang/wp-pro-max★ 4same name
- shinobiashi/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository44 other files it gives its agents.
- AGENTS.mdAGENTS.md
- diagnosing-bugsSkill
- domain-modelingSkill
- fixSkill
- frontend-designSkill
- grill-meSkill
- grill-with-docsSkill
- gsap-coreSkill
- gsap-performanceSkill
- gsap-pluginsSkill
- gsap-scrolltriggerSkill
- gsap-timelineSkill
- gsap-utilsSkill
- handoffSkill
- landing-page-conversion-auditSkill
- refactorSkill
- researchSkill
- reviewSkill
- share-learningSkill
- tddSkill
- threejs-animationSkill
- threejs-fundamentalsSkill
- threejs-geometrySkill
- threejs-interactionSkill
- threejs-lightingSkill
- threejs-loadersSkill
- threejs-materialsSkill
- threejs-postprocessingSkill
- threejs-shadersSkill
- threejs-texturesSkill
- to-specSkill
- to-ticketsSkill
- verifySkill
- wp-accessibilitySkill
- wp-accessibility-standardsSkill
- wp-css-standardsSkill
- wp-github-actions-standardsSkill
- wp-html-standardsSkill
- wp-js-standardsSkill
- wp-performanceSkill
- wp-php-standardsSkill
- wp-pluginSkill
- wp-security-auditSkill
- wp-themeSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Every user-facing string passes through a translation function.
- Very specific: line 24
Never raw __( ) or _e() inside HTML — always the escaping variants.
- Very specific: line 32
Translators comment: must immediately precede the gettext call and start with translators: — explains every placeholder
- Distinctive: line 36
Don't translate markup — translate the text, escape at echo
- Distinctive: line 37
Avoid near-duplicate strings (same wording, same punctuation)
- Very specific: line 49
Use wp.i18n (wp_set_script_translations( 'handle', 'domain' ) after enqueue): wp.i18n.__(), sprintf(), _n() — never hardcoded UI strings in …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
i18n — Translation-Ready WordPress Code
Every user-facing string passes through a translation function. No exceptions. Text domain = plugin/theme slug with dashes, passed as the LAST argument, never via variable/constant.
Function matrix
| Context | Function |
| Echo text | esc_html_e( 'Text', 'domain' ) |
| Return text | esc_html__( 'Text', 'domain' ) |
| Attribute | esc_attr_e() / esc_attr__() |
| Context (noun vs verb) | _x( 'Post', 'noun', 'domain' ) / esc_html_x() |
| Plural | _n( 'item', 'items', $count, 'domain' ) |
| Plural + context | _nx() |
| Numbers/dates | number_format_i18n(), date_i18n() |
Never raw __( ) or _e() inside HTML — always the escaping variants.
String rules
- No interpolation — use placeholders:
printf( /* translators: %s: Name */ esc_html__( 'Welcome, %s', 'domain' ), $name ); - Multiple placeholders: numbered
%1$s,%2$din single quotes (double quotes would interpolate$s) - Translators comment must immediately precede the gettext call and start with
translators:— explains every placeholder - Full sentences, no leading/trailing whitespace, no URLs inside strings, no empty
strings, no
\r - Don't translate markup — translate the text, escape at echo
- Avoid near-duplicate strings (same wording, same punctuation)
Loading
- Themes:
load_theme_textdomain( 'domain', get_template_directory() . '/languages' )in theafter_setup_themesetup function - Plugins:
load_plugin_textdomain( 'domain', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' )oninit - Header:
Text Domain: domain+Domain Path: /languagesin both
JS strings
- Use
wp.i18n(wp_set_script_translations( 'handle', 'domain' )after enqueue):wp.i18n.__(),sprintf(),_n()— never hardcoded UI strings in JS for user-facing text
Audit
Grep for: __( / _e( without text domain, raw quotes around user-facing text in
templates, interpolated $var inside __('... $var ...'), missing translators comments
on placeholders. The WPCS WordPress.WP.I18n sniff catches most — run phpcs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

