WordPress.org

Ready to get started?Download WordPress

Forums

how to make inove speak another language (5 posts)

  1. spida2
    Member
    Posted 5 years ago #

    Hi,

    I have installed the german version of wordpress. Yet, inove does still display certain expressions in english, e.g. "random posts", "tag cloud" etc.

    Any help on this is very appreciated.

    Best regards,
    Luka

  2. jbbrwcky
    Member
    Posted 5 years ago #

    I assume those things are hard-coded into the theme you're using like this:

    <h2>Random Posts</h2>

    To make the languages work, afaik, it's:

    <h2><?php _e('Random Posts'); ?></h2>

  3. spida2
    Member
    Posted 5 years ago #

    Yeah, wow, it works!
    Thank you for your help!

    EDIT:

    Just this one's a problem:
    <?php
    if (is_single()) {
    $posts_widget_title = 'Recent Posts';
    } else {
    $posts_widget_title = 'Random Posts';
    }
    ?>

    How do I handle it best?

  4. jbbrwcky
    Member
    Posted 5 years ago #

    The same way really, just replace the text with your variable:

    <h2><?php _e($posts_widget_title); ?></h2>
  5. spida2
    Member
    Posted 5 years ago #

    But I cannot put php into php, can I?

    Or should it be like this:


    <?php
    if (is_single()) {
    echo '<h2><?php _e($posts_widget_title); ?></h2>';
    } else {
    echo '<h2><?php _e($posts_widget_title); ?></h2>';
    }
    ?>

    But this would not make sense, since both times the same widget title will be given. Or am I on the wrong track?

    Cheers,
    Luka

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags