3


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></label><br/>
     <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></label><br/>
     <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</label><br/>
     <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</label><br/>
     <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)

poedit

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.