> For the complete documentation index, see [llms.txt](https://devowlio.gitbook.io/wp-react-starter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devowlio.gitbook.io/wp-react-starter/php-development/localization.md). Agents can also search and read this documentation through its [MCP server](https://devowlio.gitbook.io/wp-react-starter/~gitbook/mcp).

# Localization

There are two types of localization (i18n) coming with this boilerplate. In this part we explain the PHP localization. Just have a look at [`src/languages/your-plugin.pot`](https://devowlio.gitbook.io/wp-react-starter/usage/index/plugin.md#folder-structure) - that's the main PHP i18n file.

To localize your plugin use the i18n functions coming with [**WordPress core**](https://developer.wordpress.org/plugins/internationalization/localization/): `__`, `_n` and so on ([difference](https://wpengineer.com/2237/whats-the-difference-between-__-_e-_x-and-_ex/)). The `.pot` file is automatically generated while using [`yarn docker:start`](https://devowlio.gitbook.io/wp-react-starter/usage/index-1/root.md#development). To generate the file manually you can use the command [`yarn i18n:generate:backend`](https://devowlio.gitbook.io/wp-react-starter/usage/index-1/plugin.md#localization) in your plugin folder.

{% hint style="info" %}
When using the above functions always use your own text domain constant `WPRJSS_TD` as context parameter.
{% endhint %}

{% content-ref url="/pages/-M-Og0bEyCUY7TsvYu9n" %}
[Localization](https://devowlio.gitbook.io/wp-react-starter/typescript-development/localization.md)
{% endcontent-ref %}
