Tagged: translation
- This topic has 12 replies, 3 voices, and was last updated 5 years, 9 months ago by Skandha.
-
AuthorPosts
-
February 23, 2019 at 8:23 am #166504SchelbiParticipant
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
February 24, 2019 at 10:47 am #166554tikaramParticipant@uschelbert: I will check for the issue and let you know about the issue soon.
Regards,
TikaramFebruary 25, 2019 at 5:42 am #166646tikaramParticipant@uschelbert: Please post in your site URL so that I can check for the issue.
Regards,
TikaramFebruary 25, 2019 at 6:19 am #166653SchelbiParticipant9palaces[dot]com
Thx
February 26, 2019 at 10:49 pm #166795tikaramParticipant@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,
TikaramFebruary 27, 2019 at 1:48 am #166812SchelbiParticipantI already created a child theme. I also use WPML compatibility mode on Polylang…
February 28, 2019 at 3:24 am #166903SkandhaParticipant@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,
SkandhaFebruary 28, 2019 at 3:27 am #166904SkandhaParticipant@uschelbert: I tried sending you an email but the email you have registered doesn’t seems to be a valid one.
Kind Regards,
SkandhaFebruary 28, 2019 at 3:36 am #166905SchelbiParticipantsorry for that!! now it should be ok
March 11, 2019 at 3:52 pm #167675SchelbiParticipantHi Skandha,
Did you found a solution?
Best wishes
March 12, 2019 at 3:31 am #167694SkandhaParticipant@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.phpAdd 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,
SkandhaMarch 12, 2019 at 7:15 am #167706SchelbiParticipantHi Skandha,
Thank you!! That did the trick. Everything is working now.
Best wishes
March 12, 2019 at 7:21 am #167710SkandhaParticipant@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 -
AuthorPosts
- The topic ‘String translation’ is closed to new replies.