Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read more is not localized #28

Closed
Mte90 opened this issue Sep 9, 2021 · 6 comments
Closed

Read more is not localized #28

Mte90 opened this issue Sep 9, 2021 · 6 comments

Comments

@Mte90
Copy link
Contributor

Mte90 commented Sep 9, 2021

As you can see on

return '<a class="more-link" href="' . get_permalink() . '">' . esc_html( get_theme_mod( 'yith_proteo_blog_read_more_text', 'Read more &#10230;' ) ) . '</a>';

the string doens't have the textdomain so is not translated also if the string localization is in the po file.

@francgrasso
Copy link
Member

Hi there,
the text can be changed from the customizer: https://prnt.sc/1rllnk4

@Mte90
Copy link
Contributor Author

Mte90 commented Sep 9, 2021

Yes but in a multilanguage website I need that is localized, in the po file there is the string but this code ignore the case that the parameter in th customizer is empty and use that one.

@Mte90
Copy link
Contributor Author

Mte90 commented Sep 9, 2021

immagine
Seems also as how the file names are structured in the theme they are not loaded by wordpress as in languages the file has the theme prefix but natively is not looking for them with that name

@Mte90
Copy link
Contributor Author

Mte90 commented Sep 9, 2021

function yith_proteo_modify_read_more_link() {
    $string = get_theme_mod( 'yith_proteo_blog_read_more_text' );
    if ( empty( $string ) ) {
        $string = __( 'Read more  &#10230;', 'yith-proteo' );
    }
	return '<a class="more-link" href="' . get_permalink() . '">' . esc_html( $string ) . '</a>';
}

add_filter( 'the_content_more_link', 'yith_proteo_modify_read_more_link' );

I changed the code in this way

@Mte90
Copy link
Contributor Author

Mte90 commented Nov 16, 2021

ping

@francgrasso
Copy link
Member

Hi there, fixed in commit b4c080e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants