Custom values are not translated



I'm trying to translate my plugin. Inside plugin's root folder I have 'inc' folder, where located registration.php file. This file has a code, which adds custom fields to comment form. (I use right solution from this answer) and here is a part of a code, which should be translated.

$myfields['code'] = sprintf(
'p class="comment-form-code"
     label for="code"%s span class="required"*/span/labelbr/
     input id="code" name="code" type="text" tabindex="5"  /
 /p', 
    __('Personal Code', 'kvkoolitus')
); 

$myfields['phone'] = sprintf(
'p class="comment-form-phone"
     label for="phone"%s span class="required"*/span/labelbr/
     input id="phone" name="phone" type="text" size="30" tabindex="5" /
 /p', 
    __('Phone', 'kvkoolitus')
);

$myfields['address'] = sprintf(
'p class="comment-form-address"
     label for="address"%s/labelbr/
     input id="address" name="address" type="text" size="30" tabindex="5" /
 /p', 
    __('Address', 'kvkoolitus')
);

$myfields['company'] = sprintf(
'p class="comment-form-company"
     label for="company"%s/labelbr/
     input id="company" name="company" type="text" size="30" tabindex="5" /
 /p', 
    __('Company', 'kvkoolitus')
);

I successfully see all values in my .po files, but default name and email fields (green color) are translated on the front-page, but custom fields are not (red color)



Topic translation plugin-qtranslate comment-form plugin-development plugins Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.