Tagged: x
-
AuthorPosts
-
February 10, 2017 at 10:52 am #1366039February 13, 2017 at 5:55 am #1368761
Hi there and thank you for your reply.
I did follow the instructions step by step, however, the translation did not work. The submit button and the read more link are still in English. Any suggestions why?
I have a child theme and created an extra folder “languages” and placed both “po” and “mo” file in it. I also uploaded the “xpot” into its original folder – all uploads happened via Filezilla.
Translating the dates happend via the last step described in the instructions wp-admin > settings > general. At least that worked. 🙂
Thank you so much!
February 13, 2017 at 8:02 am #1368878Hi 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
March 3, 2017 at 6:25 am #1393204This reply has been marked as private.March 3, 2017 at 6:14 pm #1393871Hi there,
Maybe that strings is on different textdomain. Please check #2 from here https://community.theme.co/forums/topic/buddypressother-plugins-and-polylang/#post-1391305 explaining about textdomain.
It’s either translate them on every textdomain by just using MO/PO files or use Translation plugin for faster implementation.
Thanks!
March 6, 2017 at 4:26 am #1395966Hi there,
thanks for the reply. I have already tried the MO/PO files, however, that did not work. The WPML plugin in not working either. Is there no way that I can easily translate buttons like e.g. submit and the contact formular etc.?
Thanks!
March 6, 2017 at 9:38 pm #1397157Hi There,
I can see where the issue is coming from.
Look for this code on Appearance > Customize > Custom > Edit Global JS:add_filter('gettext', 'translate_text_to_german', 20, 3); function translate_text_to_german($ttxt, $txt, $d) { switch ($txt) { case 'Submit': return '"Absenden"'; break; } return $ttxt; } add_action( 'after_setup_theme', 'load_child_language' ); function load_child_language() { load_child_theme_textdomain( '__x__', get_stylesheet_directory() . '/languages' ); }
That is a PHP code and should be added on your child theme’s functions.php file. It will cause syntax error on your javascript. Please remove the code from it’s current location and add it instead on your child theme functions.php file. That is the reason why it is not working. Javascript doesn’t know how to process that code.
Hope this helps.
March 13, 2017 at 8:53 am #1404864Thank you! That did the trick for the translation of the submit button! The “read more” link and “comments” are still in English though, is there a code that I can use to get them translated?
Thanks so much!
March 13, 2017 at 11:12 pm #1405852Hi There,
Try updating this part:
function translate_text_to_german($ttxt, $txt, $d) { switch ($txt) { case 'Submit': return '"Absenden"'; break; }
To this:
function translate_text_to_german($ttxt, $txt, $d) { switch ($txt) { case 'Submit': return '"Absenden"'; break; case 'Read More': return 'Read More translation'; break; case 'Comments': return 'Comments translation'; break; }
Hope this helps.
March 30, 2017 at 11:07 am #1425433Hi and thank you again!
It did work for the “read more” translation and the “submit” button, however, the “comments” counter above the blog entries is still in English. I have made a screenshot.
Thank you!
March 30, 2017 at 10:15 pm #1425913Hello There,
Because the the comments has dynamic counter, you can only translate this in the mo/po files. It doesn’t work for you because you have set it up in correctly. You need to upload the mo/po files in this folder: /wp-content/languages/themes/ and then the filenames should be:
__x__-de_DE.mo __x__-de_DE.po
To save you some time, I have edited the mo/po files and uploaded these files in the correct folder. Please check your site now.
-
AuthorPosts