Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #18597


    Some pieces of text (for example: the contact form send button, send us mail title, the breadcrumbs, the search field) aren’t wrapped in Gettext call, therefore they can’t be translated with WPML.


    WPML documentation about Gettext:

    1) How can i add <?php _e(‘text’,’theme-text-domain’); ?> to contact-form.php for ‘Send us mail’ and ‘Send’:

    $form_args = array(

    "heading" => "<h3>".__('Send us mail','avia_framework')."</h3>",
    "success" => "<h3>".__('Your message has been sent!','avia_framework')."</h3><p>".__('Thank you!','avia_framework')."</p>",
    "submit" => __('Send','avia_framework'),
    "action" => get_permalink(),
    "myemail" => avia_get_option('email'),
    "myblogname" => get_option('blogname'),
    "autoresponder" => avia_get_option('autoresponder'),
    "autoresponder_subject" => __('Thank you for your Message!','avia_framework'),
    "autoresponder_email" => avia_get_option('email')

    2) How can i add <?php _e(‘text’,’theme-text-domain’); ?> to searchform.php for ‘Search site’:

    <form action="<?php echo home_url( '/' ); ?>" id="searchform" method="get">
    <input type="submit" value="" id="searchsubmit" class="button"/>
    <input type="text" id="s" name="s" value="<?php _e('search site','avia_framework')?>"/>
    <?php do_action('avia_frontend_search_form'); ?>

    3) How can I also do this with the breadcrumbs? Where are they located?



    1 + 2) These text strings are already in a __ or _e function and fully translatable with po/mo files. Eg compare the searchform code:

    <?php _e('search site','avia_framework')?>

    “search site” = text


    “avia_framework” = theme text domain. Maybe try to translate the po/mo files with Poedit:

    3) The breadcrumb text is also translatable with po/mo files. The breadcrumb links use the page/post, etc. title and are not translatable – however you can change the page titles if you like. The code can be found in choicesframeworkphpclass-breadcrumb.php



    I just set up the theme to test it out amd I am getting translations just fine. Have you instlled the String Translation plugin that comes with WPML? Please take a look After you scan your theme, all those strings will be converted automatically.




    I’ll check it again. Thanks for the quick reply! I appreciate it !


    Hi megalex,

    Let us know if you have any other issues or questions :)

    I’ll close this topic for now.



Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Pieces of text not translatable with WPML’ is closed to new replies.