Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

Internationalisation

WP-PFManagement supports 4 built-in locales plus custom ones. Every user-facing label can be translated per locale.

Built-in locales

LocaleLanguage
es_ESEspañol
en_USEnglish
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:

  1. Requested locale (e.g., es_ES)
  2. Short form of requested locale (e.g., es)
  3. Legacy single-language column (e.g., the label column 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.