• Resolved Franz92

    (@franz92)


    Hello everyone!

    First to the theme author: Thank you for a great theme.

    My challenge with the theme is that the translation works only partially: https://mobil-im-tal.de/zur-mitfahr-app/ For example the popular-post widget title is translated, but not the headers “Popular” and “Recent”. Also the “Search” is not translated.

    How can I fix this?

    Thank you for your ideas!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @franz92,

    I hope you are well today and thank you for your question.

    It should be translated but if not then try regenerating theme translation files po file and mo file as described on the following pages.

    https://premium.wpmudev.org/blog/how-to-translate-a-wordpress-theme/
    https://www.solostream.com/blog/translate-wordpress-theme/

    Alternatively you can just create a plugin file colorlib-plugin.php in your plugins directory and then add the following code in it. After that activate this “Colorlib Plugin” on your site.

    <?php
    /*
    Plugin Name: Colorlib Plugin
    Description: Quick Custom Solution Plugin for Implementing Custom Solution.
    Version: 1.0.0
    Author: Movin
    Author URI: https://freewptp.com/
    License: GNU General Public License (Version 2 - GPLv2)
    */
    
    function colorlib_change_translate_text( $translated_text, $text, $domain ) {
    	if ( $domain ==  'unite' ) {
                if( trim($translated_text) == 'Popular' ){
                    $translated_text = 'Beliebt';
                } else if( trim($translated_text) == 'Recent' ){
                    $translated_text = 'Kürzlich';
                }
    
            } 
    
            if( trim($translated_text) == 'Search...' ){
                    $translated_text = 'Suche...';
    
            }
    
    	return $translated_text;
    }
    add_filter( 'gettext', 'colorlib_change_translate_text', 99, 3 );

    Best Regards,
    Movin

    Thread Starter Franz92

    (@franz92)

    That was amazingly fast and worked perfectly. Thank you!

    You are most welcome here ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Translation only partially active’ is closed to new replies.