Internationalisation
WP-PFManagement supports 4 built-in locales plus custom ones. Every user-facing label can be translated per locale.
Built-in locales
| Locale | Language |
|---|---|
es_ES | Español |
en_US | English |
zh_CN | 中文 |
ja | 日本語 |
Custom locales
Add extra locales via REST: PUT /pfw/v1/locales with {"fr_FR": "Français"}
Per-row translations
Entities, fields, roles, groups, actions, modules, and applications all have a labels_json column that stores translations:
{
"label": {"es_ES": "Incidencia", "en_US": "Ticket", "ja": "チケット"},
"label_plural": {"es_ES": "Incidencias", "en_US": "Tickets"}
}
Resolution logic
I18nHelper::resolve() follows this fallback chain:
- Requested locale (e.g.,
es_ES) - Short form of requested locale (e.g.,
es) - Legacy single-language column (e.g., the
labelcolumn directly)
SPA i18n
The React SPA receives the current locale and list of supported locales in its bootstrap payload. JavaScript translations are loaded from .json files matching WordPress's script translation API.