Skip to content

Latest commit

 

History

History
executable file
·
11 lines (7 loc) · 1.02 KB

localization.md

File metadata and controls

executable file
·
11 lines (7 loc) · 1.02 KB

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 - that's the main PHP i18n file.

To localize your plugin use the i18n functions coming with WordPress core: __, _n and so on (difference). The .pot file is automatically generated while using yarn docker:start. To generate the file manually you can use the command yarn i18n:generate:backend 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 %}

{% page-ref page="../typescript-development/localization.md" %}