Tagged: 

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #166504
    Schelbi
    Participant

    Hi,

    I’m not able to translate the Featured Content in Solid Construction Pro. I use Polylang and Loco but I cannot find the string…. 9palaces[dot]com

    Thx

    #166554
    tikaram
    Keymaster

    @uschelbert: I will check for the issue and let you know about the issue soon.

    Regards,
    Tikaram

    #166646
    tikaram
    Keymaster

    @uschelbert: Please post in your site URL so that I can check for the issue.

    Regards,
    Tikaram

    #166653
    Schelbi
    Participant

    9palaces[dot]com

    Thx

    #166795
    tikaram
    Keymaster

    @uschelbert: For translation you will need to create a child theme and create a function to modify as per the requirement. Let me know if you are comfortable with child theme customization. I recommend you to use WPML plugin for translation as it is supported and recommended by our Pro themes.

    Regards,
    Tikaram

    #166812
    Schelbi
    Participant

    I already created a child theme. I also use WPML compatibility mode on Polylang…

    #166903
    Skandha
    Participant

    @uschelbert: I will need to have a look into your site to properly enable the polylang functions. For that I will need you WP admin login credentials. I will contact you shortly by email.

    Kind Regards,
    Skandha

    #166904
    Skandha
    Participant

    @uschelbert: I tried sending you an email but the email you have registered doesn’t seems to be a valid one.

    Kind Regards,
    Skandha

    #166905
    Schelbi
    Participant

    sorry for that!! now it should be ok

    #167675
    Schelbi
    Participant

    Hi Skandha,

    Did you found a solution?

    Best wishes

    #167694
    Skandha
    Participant

    @uschelbert: Hello there,
    Sorry for the late reply.
    First of all
    Go to => Child Theme Folder => functions.php and add the following Code.

    function polylang_translation() {
    	if ( function_exists( 'pll_register_string' ) ) {
    		$headline = get_theme_mod('solid_construction_featured_content_archive_title', esc_html__( 'Featured Content', 'solid-construction-pro') );
    		$sub_headline = get_theme_mod('solid_construction_featured_content_sub_title', esc_html__( 'Here you can showcase the x number of featured contents', 'solid-construction-pro') );	
    
    		pll_register_string( 'solid_construction_featured_content_archive_title', $headline, 'Solid Construction Pro' );
    		pll_register_string( 'solid_construction_featured_content_sub_title', $sub_headline, 'Solid Construction Pro' );
    
     		$quantity = get_theme_mod( 'solid_construction_featured_content_number', 3 );
    			for ( $i = 1; $i <= $quantity; $i++ ) {
    			 	$title   = get_theme_mod( 'solid_construction_featured_content_title_' . $i );
    				$content = get_theme_mod( 'solid_construction_featured_content_content_' . $i );
    				$more_button = get_theme_mod( 'solid_construction_featured_content_more_button_text_' . $i );
    				pll_register_string( 'solid_construction_featured_content_title_', $title, 'Solid Construction Pro' );
    				pll_register_string( 'solid_construction_featured_content_content_', $content, 'Solid Construction Pro' ); 
    				pll_register_string( 'solid_construction_featured_content_more_button_text_', $more_button, 'Solid Construction Pro' );//die('aaaa');
    			}	
    	}
    }
    add_action ( 'admin_init', 'polylang_translation' );

    Now you will find the Featured Content strings in Languages => String Translations.
    You should be able to add translated strings for Featured Content section.

    To make the translated text on your site when you change the language.

    Go to => Child Theme Folder => create a folder template-parts => Under template-parts create another featured-content and under featured-content folder
    create two files display-featured.php and content-image.php

    Add the code in this link to display-featured.php.
    and add the code in this link to content-image.php.

    Now you should be able to translate the featured content section.
    Let me know if this works out.
    Kind Regards,
    Skandha

    #167706
    Schelbi
    Participant

    Hi Skandha,

    Thank you!! That did the trick. Everything is working now.

    Best wishes

    #167710
    Skandha
    Participant

    @uschelbert: Hello there, I hope I was able to resolve your issue. If it’s not too much trouble, I have a quick request: could you please leave an honest review?
    https://wordpress.org/support/theme/solid-construction/reviews/#new-post
    Your review will help others know what to expect when they’re looking for the support I offer. Even a sentence or two would be hugely appreciated. Thanks, and if there’s anything else at all that I can do to help, don’t hesitate to let me know. Have a good day! 🙂

    Kind Regards,
    Skandha

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘String translation’ is closed to new replies.