wp-i18n-audit

Audit WordPress plugin and theme PHP for i18n translation issues.

21|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wp-i18n-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wp-i18n-audit
Source: https://github.com/Lonsdale201/wp-agent-skills/tree/main/wordpress/wp-i18n-audit
Command: npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wp-i18n-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

WordPress plugins and themes often ship with translation issues that break localization, such as mismatched text domains, incorrect or missing translation helpers, improper placeholders, and header misconfigurations that prevent translations from loading correctly in different environments.

Core Features & Use Cases

  • Canonical text-domain verification across PHP translation calls to ensure runtime translations load from the correct domain.
  • Static-domain enforcement and detection of dynamic or variable text domains that hinder pot extraction.
  • Context and placeholders checks for _x, _n, and related helpers, including translator comments for translators.
  • Load of proper translation hooks (load_plugin_textdomain / load_theme_textdomain) and header text-domain consistency checks.
  • Guidance for common workflows (releases, migrations, contributor PRs) and actionable remediation steps.
  • Generates a structured report detailing file, line, code excerpt, recommended Fix, and severity.

Quick Start

Run the i18n audit on a WordPress plugin or theme repository to generate a report of text-domain and translation-function issues.

Frequently Asked Questions about wp-i18n-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit WordPress plugin translation files for text-domain issues?

To audit WordPress plugin translations, run a static analysis scan across PHP codebases to detect text-domain mismatches, dynamic domains, and improper translation helper usage. This generates a prioritized severity report detailing file, line, code excerpt, and recommended fixes.

Why are my WordPress theme translations not loading correctly in production?

WordPress theme translations fail when load_theme_textdomain hooks are missing or header text-domains are misconfigured. Static code auditing identifies these runtime loading issues and header inconsistencies, providing actionable remediation steps to ensure proper localization.

Does this i18n audit check dynamic text domains in PHP translation calls?

Yes, the i18n audit disallows dynamic or variable text domains in PHP translation calls. It enforces static-domain compliance to ensure .pot file extraction works correctly and canonical text-domains remain consistent across plugins and themes.

What is the best way to validate placeholder usage in WordPress translation functions?

The best way to validate placeholders in WordPress translation functions is static analysis of _x, _n, and related helpers. This checks context, validates placeholder syntax, verifies translator comments, and outputs a structured severity report.

Can I use static analysis to fix i18n issues across multiple WordPress plugin directories?

Yes, you can scan across multiple WordPress plugin and theme directories to identify i18n translation issues. The audit verifies domain consistency, checks escaping, and provides a structured report with file, line, and recommended fixes for each directory.