How can I translate buttom "continue reading" on russian?
-
How can I translate button “continue reading” on russian?
Everything in theme are in russian except this button
Thanks
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.
Thanks, I’ll try 🙂
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?`
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/
Thanks 🙂 I’ll watch your tutorial!
Mod
Mod
Moved to Support
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? 🙂
Try this plugin:
http://wordpress.org/extend/plugins/codestyling-localization/
Viewing 10 posts - 1 through 10 (of 15 total)
- 1
- 2
- You must be logged in to reply to this topic.
