Return to Support

How can I translate buttom "continue reading" on russian?

Home Forums Graphene WordPress theme Support How can I translate buttom "continue reading" on russian?

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #2812
    TheStigger1
    Member

    How can I translate button “continue reading” on russian?

    Everything in theme are in russian except this button

    Thanks

    #22025
    Josh
    Member

    Are you using a child theme? You will need to add a custom function. The best way to do this is inside a child theme’s functions.php file.

    Here is the function:

    // Change "Read the rest of this entry" link Button
    function graphene_filter_readmore( $translated, $original, $domain ) {
    $strings = array(
    'Continue reading »' => 'Russian Text »',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_readmore', 10, 3 );

    You can change “Russian Text” to whatever you like.

    #22026
    TheStigger1
    Member

    Thanks, I’ll try 🙂

    #22027
    TheStigger1
    Member

    I don’t have something like “Russian text”, just something like this:

    * Returns a "Continue Reading" link for excerpts
    * Based on the function from the Twenty Ten theme
    *
    * @since Graphene 1.0.8
    * @return string "Continue Reading" link
    */
    if (!function_exists( 'graphene_continue_reading_link' ) ) :
    function graphene_continue_reading_link() {
    global $in_slider;
    if (!is_page() && !$in_slider) {
    $more_link_text = __( 'Continue reading »', 'graphene' );
    return '</p><p><a class="more-link block-button" href="'.get_permalink().'">'.$more_link_text.'</a>';
    }
    }
    endif;

    I tried to change “Continue reading” to my text, but I don’t know what to do with functions.php 😀 In what folder I need to put this file?`

    #22028
    Josh
    Member

    The function I included above is a custom function. You won’t find it in the core functions.php file. You will need to add the entire function to your child theme’s functions.php file.

    Here is a video for the proper way of setting up a child theme with graphene:

    http://www.joshlobe.com/2011/10/video-tutorial-creating-a-child-theme-in-wordpress/

    #22029
    TheStigger1
    Member

    Thanks 🙂 I’ll watch your tutorial!

    #22030
    #22031

    Moved to Support

    #22032
    TheStigger1
    Member

    I understand how to modify the functions.php and now I can change “Continue reading”. But when I trying to write on Cyrillic, it doesn’t work and the text is disappear. And how I can translate it? 🙂

    #22033
    Luko
    Member
    #22034
    TheStigger1
    Member

    I tried. This plugin finds this text, but when I enter russian text – nothing changes. Even when I enter any english text – nothing changes. Did you use this plugin?

    #22035
    Syahir Hakim
    Keymaster

    What’s the Russian translation of Continue Reading? Type it here and I’ll update the translation file for you.

    #22036
    TheStigger1
    Member

    Continue Reading – Продолжить чтение (verbatim)

    or

    Читать полностью – Read full text (sounds better)

    #22037
    Syahir Hakim
    Keymaster

    Actually, the translation file already has the translation for the “Continue reading” text. I just tried it on my local server and the translation displays properly on my end.

    Try downloading the theme’s latest language pack here:

    http://www.khairul-syahir.com/wordpress-dev/graphene-theme#languages

    Scroll down after the list of languages the theme is available in, and you should see a download link for the latest language pack, along with the instruction on how to use it.

    #22038
    TheStigger1
    Member

    Thanks!! 🙂

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

You must be logged in to reply to this topic.