Feralheart
Feralheart

Reputation: 1920

Wordpress: 100% plugin translation not working

I created a "site specific plugin" what adds a custom post type to my wordpress instance. I made a .po file for it with PoEdit and even Loco Translate shows that it's 100% translated, but it's not working.

Structure:

- plugins
 - mysitecore.php
 - mysitecore
  |
  - languages
   |
   - mysitecore-hu_HU.po
   - mysitecore-hu_HU.mo

What can be the problem?

Upvotes: 1

Views: 2540

Answers (1)

Alexis Vandepitte
Alexis Vandepitte

Reputation: 2088

I went through this a while ago and my solution was this.

The language file's name should be like this :

plugindomain-hu_HU.po

and the domain in translation functions needs to be the same as what is previous "-hu_HU.po". So plugindomain.

For example : _e('Text to be translated','plugindomain');

Upvotes: 3

Related Questions