Translating issue

Hey guys,

I’ve used a .mo and .po file to translate the ‘Read more’ on the blog page and it works fine. But I also want to translate the ‘Sort portfolio’ filter text on the portfolio page. http://bit.ly/2hBMOV1
I found the string in the translation file I think, but it ignores the translation. Can you help me out?

Hi there,

Thanks for writing in.

It’s behind a coming soon page, and can’t check what’s stack you’re on. But I assume you’re on integrity, and since the text is pulled from database then language files has no effect on it, so please add this code to your child theme’s functions.php with your preferred translation

add_filter('x_option_x_integrity_portfolio_archive_sort_button_text', 'portfolio_sort_text', 99 );

function portfolio_sort_text ( $text ) {

if ( is_admin() ) return $text;

return "Your translation here";

}

Thanks!

Yes, it’s integrity. This works, thanks!

*Edit: While browsing the theme options I just accidently found out that you don’t need to add anything to the functions.php. There is actually an option to change the text in theme options > Integrity under portfolio options :slight_smile:

Great, thanks for sharing.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.