Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6643

    Hi,

    I’ve found in the class-breadcrumb.php this line of code:

    <br />
    echo '<p class="breadcrumb"><span class="breadcrumb_info">'.__('You are here:','avia_framework').'</span> <a href="'.get_bloginfo('url').'">';<br />
    </a>

    How can I make the part “You are here” ready for translation with the theme’s .po-file, so that – hopefully – the WPML-plugin translate it right, too, when I change my languages between English and German?

    Thanks.

    #54933

    Hey,

    in your .po file adding the following should do the trick, though I haven’t tested it:

    #: ../framework/php/class-breadcrumb.php:20
    msgid "You are here:"
    msgstr "Ihr seid hier:"

    #54934

    Thanks, but this has no effect :-(

    Need I change this part of text within the class-breadcrumb.php itself with some “code” (gettext)?

    #54935

    Basically you can use:

    __('my text','avia_framework')

    to call the translated text only – you need to echo/output it or you can save the text string in a variable, etc.

    or you can use:

    _e('my text','avia_framework')

    to echo/output the text directly. I don’t see a reason to use sprintf/printf with this text string.

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

The topic ‘Making breadcrumbs ready for translation?’ is closed to new replies.