This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 6 replies, has 2 voices.
Last updated by Itamar 4 years, 8 months ago.
Assisted by: Itamar.
Author | Posts |
---|---|
October 1, 2020 at 10:11 am | |
Martino |
Translated theme strings are not showing up in frontend |
October 1, 2020 at 11:04 am | |
October 1, 2020 at 11:07 am #7142965 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi. We need to replicate this issue on a fresh WordPress installation. Then I'll be able to debug it properly and escalate it to our second tier supporters if needed. For this, I created a test website with a clean WordPress install. You can access it through this link: hidden link With this link, you'll be directly logged in. Could you please install the Pittini theme and see if the issue is replicable on a clean WordPress installation? Please configures WPML as it is set on your site (Italian as default language). When everything is finished, and you can replicate the problem, please let me know. Thanks, |
October 1, 2020 at 2:17 pm #7144547 | |
Martino |
my theme is custom made and I need to upload it via FTP |
October 1, 2020 at 3:19 pm #7145395 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
I see. In this case, can you share with me the theme so I can test it on my local server? Thanks, |
October 1, 2020 at 3:32 pm | |
October 4, 2020 at 9:41 am #7159261 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi, and thanks for sharing the theme with me. I was able to install it on my local test site. It didn't work well probably because of some custom settings that you have on your site. Nevertheless, I was able to check the issue with the strings that are not showing the translation on the front-end. For example, I used this string: <li><a href="<?php echo get_page_link(icl_object_id(20, 'page', false)); ?>"><?php esc_html_e('Il gruppo','pittini'); ?></a></li> And when I translate it in String Translation after switching the language of the string into Italian the translation shows on the front-end. Please see the attached screenshots Il-gruppo-in-st.jpg and the-group-in-en.jpg. Then I rechecked it on your site, and I can see that those strings in the footer are now also translated. Please see the attached screenshot footer-ok.jpg. Have you solved this problem already? Regards, |
October 6, 2020 at 9:25 am #7171303 | |
Martino |
Hi Itamar, I wasn't able to fix the problem, I went on and used Loco Translate to quickly address the issue of missing string translation. As of now I still don't find a way to fix it, I tried various solution but, while in the backend I see all the strings and I can even scan for new ones, in the front end they are not translated. I'm testing only for my user id some strings in the footer: <?php $user = wp_get_current_user(); if ($user->ID == 1) { ?> <?php _e('Test di traduzione','test_traduzione'); ?> <?php _e('Altro test','pittini'); ?> <?php } ?> so these are new and not scanned by Loco, just by WPML String translation. |
October 6, 2020 at 3:06 pm #7174443 | |
Itamar WPML Supporter since 02/2016
Languages: English (English ) Timezone: Asia/Jerusalem (GMT+03:00) |
Hi. Still, I was not able to replicate this problem on my test site. As I mentioned, I could not make your theme work as it works on your site. For example, the footer is not showing on my local site. But I added those same strings to the header of the site by inserting them on the header.php file like that. <li><?php _e('Test di traduzione','test_traduzione'); ?></li> <li><?php _e('Altro test','pittini'); ?></li> So in this case, it working and I can see the translations from String Translation on the front-end. Please see the attached screenshots. Since I can't replicate the issue with your theme on my local site, here is how I suggest that we continue. I suspect that there is a collision with the theme or another plugin that might cause this problem. If possible get your site into a minimum environment. Minimum environment in your case means deactivating third-party plugins except for WPML. So please, deactivate all plugins except the WPML and its add-ons and WooCommerce itself. Then please check if the problem persists. If it does not persist so start by activating the plugins one by one and check when the problem comes back, then report to me which was the culprit plugin. If you want I can also create a test server for your site on our server where you will be able to migrate your site to and continue to debug the issue there without the risk of breaking your live site. Please let me know if you want to proceed this way. Regards, |