Tagged: x
-
AuthorPosts
-
January 2, 2017 at 9:19 am #1312653
Magik WebParticipantWe’ve been using WPML and Theme X for a while now since our clients are 99% french.
We recently noticed that many terms on our own website are not translated properly, see attached files.
Terms such as “Reply”, “Comments”, etc.We’re starting to think that all native Theme X terms are not being translated and we don’t know where to look to get it fixed.
ICL_LANGUAGE_CODEreports “fr” properly.Any hint or checkup would be appreciated.
Thank you for any feedback!January 2, 2017 at 9:21 am #1312660
Magik WebParticipant1.png was too large, I cropped it.
January 2, 2017 at 9:22 am #1312661
Magik WebParticipantWish I could edit the first post, here is another (more cropped) version. Sorry for the multiposting.
January 2, 2017 at 11:41 pm #1313696
ChristopherModeratorHi there,
Please find and translate strings in x.pot file, please check this link : https://community.theme.co/kb/translation
Hope it helps.
January 3, 2017 at 7:42 am #1314079
Magik WebParticipantHello Christopher, thank you for the follow-up.
Even though that doesn’t explain why WPML wouldn’t work properly with Theme X, we gave it a shot to fix the issue.
Sadly, we didn’t succeed that way, it may be our fault, but we followed the provided tutorial.See attached files, let us know if we failed somewhere.
Looking at the bottom of this page: https://www.magikweb.ca/blogue/comment-choisir-son-hebergement-web still shows “Reply” and “Edit”.
January 3, 2017 at 8:41 am #1314133
ChristianModeratorHey there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
January 3, 2017 at 9:46 am #1314229
Magik WebParticipantThis reply has been marked as private.January 3, 2017 at 10:51 pm #1315261
ChristopherModeratorHi there,
Please create a new folder in child theme directory called ‘languages’. Move both
fr_CA.poandfr_CA.mofiles to x-child/languages.Add following code in child theme’s functions.php file :
add_action( 'after_setup_theme', 'load_child_language' ); function load_child_language() { load_child_theme_textdomain( '__x__', get_stylesheet_directory() . '/languages' ); }Hope it helps.
January 4, 2017 at 7:20 am #1315690
Magik WebParticipantHello Christopher,
We did the suggested changes as shown in the attached files. We specifically translated the string “Read More”.
It still reads “Read More” in the blog section: https://www.magikweb.ca/blogueThank you for your patience.
January 4, 2017 at 8:14 pm #1316805
RadModeratorHi there,
I just checked and the only “Read More” that WPML could see is from Buddypress. Or simply, the translation file isn’t loaded at all. I went ahead and edit your code in child theme to force “Read More” translations, but it throws error on line one
Parse error: syntax error, unexpected end of file in /home/magikweb/public_html/wp-content/themes/x-child/functions.php on lineI went ahead and fix the encoding issue. And the translation fix should be like this
add_filter('gettext', 'x_translate_text' , 20, 3); function x_translate_text($translated_text, $text, $domain){ $translation = array( 'Share on Facebook' => 'Partager sur Facebook', 'Share via Email' => 'Partager sur Email', 'Share on Google+' => 'Partager sur Google+', 'Share on LinkedIn' => 'Partager sur Linkedin', 'Share on Twitter' => 'Partager sur Twitter', 'Read More' => 'Lire la suite' ); if( isset( $translation[$text] ) ) { return $translation[$text]; } return $translated_text; }Thanks!
January 5, 2017 at 2:41 pm #1317826
Magik WebParticipantThank you Rad. We don’t understand why WPML wouldn’t see it.
Nonetheless, we will do all remaining translations that way when WPML doesn’t find them from now on.Have a great day!
January 5, 2017 at 8:45 pm #1318314
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1312653 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
