• Hello, I’m tasked with converting a legacy theme to multilingual support. So far, I’ve managed to get it working with most of the parts but single.php file contains some code where I need your help.
    For example:

    <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>

    I want to extract “Pages” word from the code above.

    Also

    <div class='create-comment'>
    						 	<?php $comment_args = array( 'title_reply'=>'Write a response',
    
    'fields' => apply_filters( 'comment_form_default_fields', array(
    
    'author' => '<div class="row"><div class="form-group col-sm-6"><label for="author">Your name</label> <span>*</span> <input id="author" name="author" type="text" class ="form-control" value="" size="30" /></div>',   
    
        'email'  => '<div class="form-group col-sm-6"><label for="email">Your email</label> <span>*</span> <input id="email" name="email" class ="form-control" type="text" value="" size="30" /></div></div>',
    
        'url'    => '' ) ),
    
        'comment_field' => '<div class="form-group"><label for="comment">Your comment</label>  <span>*</span>  <textarea id="comment" name="comment" class ="form-control"  cols="45" rows="4" aria-required="true"></textarea>' .
    
                    '</div>',
    
        'comment_notes_after' => '',
    
    );
    
    comment_form($comment_args); ?>
    						 </div>

    How can I extract static text like “Your name”, “Your email”, etc from the code above?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to Make Theme's Comment Form Compatible with PoEdit for Translation’ is closed to new replies.