Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 13 replies, has 2 voices.

Last updated by Andreas W. 1 month ago.

Assigned support staff: Andreas W..

Author Posts
October 2, 2019 at 11:38 am #4679841

sergeyS-14

I am trying to: Translate html block "<p style="font-size: 24px; font-weight: 400; margin-left: 22px;"> Free Consultation   <a class="gt3_icon_link" href="#" target="_blank" style="font-size: 24px; color: inherit; margin-right: 15px; margin-top: 5px;" rel="noopener"><i class="fa fa-phone"></a>+34 682 085 432</p>"

Link to a page where the issue can be seen: hidden link (Free Consultation... on top)

I expected to see: translated text, and i can see this text in admin area when i do String Translation with WPML

Instead, I got: same block in all languages...

October 2, 2019 at 12:06 pm #4680025

sergeyS-14

How i can debug this part if translation going well?
look at screenshot

October 2, 2019 at 6:27 pm #4682751

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support Forum.

Could you please install the currently used theme on the following test site and recreate the issue here:

One-Click Login:hidden link

If the issue also occurs on this new WP install, then we might be handling a compatibility issue and we will need to escalate to our compatibility team.

Please also provide detailed steps for recreating the issue.

Kind regards
Andreas

October 3, 2019 at 9:19 am #4686259

sergeyS-14

Hi there!

I dont know how i can do this in this instalation BUT:

1. Created backup with Duplicator on original website
2. Uploaded this zip of this backup in this wordpress instalation (hidden link), put it in folder where Duplicator store files but i dont know how i can restore i dont see any options of how do this...

October 3, 2019 at 10:13 am #4686697

sergeyS-14

Also it might be useful or related with current problem:

We have active child theme: hidden link

But wpml say he can found string in main theme: hidden link

Also i note none of string translation is working, the only works is translated pages, menus, widgets... but not Strings like i have in code:
<h3><?php echo esc_html__('PayPal', 'oconnor-child') ?></h3>

and when i make translation of this page i got translated only the title and content but not any part like this "<h3><?php echo esc_html__('PayPal', 'oconnor-child') ?></h3>" in template (its custom post_type "pay-service")...

And in settings of wpml it saved as translatable post_type hidden link

I hope it helps some how...

October 3, 2019 at 2:17 pm #4688637

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

It would be enough if you only add the main theme to this test site by uploading its zip-archive at Plugins -> Add new -> Upload:

One-Click Login:hidden link

If you could add the child theme as well, it would be helpful, but not mandatory. You will need to use the FTP access in order to do so.

Then please provide me detailed information:

1) Where did you add the HTML code?
2) How did you try to translate it?
3) Are there any other plugins involved in creating the HTML block or are there page builders used? If so, also include them in the test site.

Let me know when the site is ready. Besides, you could provide access to the site, in order for me to have a look into the issue, but as I think this might be a compatibility issue, I will need to see if the issue also occurs on a new install while using the same theme/plugins.

Kind regards
Andreas

October 4, 2019 at 11:56 am #4695443

sergeyS-14

I import theme and demo data of this theme and in your install its working fine...

How i can debug the translation proccess? What hooks/actions in charge when the translation magic happens when this code works: echo esc_html__('Credit or Debit Card', 'oconnor-child');

I think something wrong in this actions/hooks when the WPML hook in to this esc_html__... or similar functions...

I understand you dont need to do this, just asking for help... for debug to see why is this happening and why something block WPML to translate...

Any information can be useful. Please help.
Thank you!

October 4, 2019 at 3:13 pm #4696839

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I am not sure if I am understanding the issue.

I now create a test page "WPML Test" where I added your HTML code into a G3 Custom Text Widget.

The page was translated with the WPML Translation Editor and successful.

In your case do I understand right, that you are adding information to the child theme template files or are you only editing on the WordPress page Editor?

Please take note that the GetTextCalls calling the string and domain will only work in template files in is necessary in order for WPML to register the strings.

Please clarify and provide detailed steps about the task you are trying to accomplish.

Kind regards
Andreas

October 7, 2019 at 8:17 am #4705227

sergeyS-14

First of all thank you for you time, Andreas. Probably my English is the reason and i cant clear describe my questions... I will try to separate it so you can understand me better i hope.

1. On my site String Translation is not working properly. It seems like no apply to the front end. I see translation and can do translate in admin section of WPML but its not apply to the frontend.

2. I can't recreate same issue on your demo website, so it mean its may NOT your problem or Not problem of WPML at all. But i need to be sure about this. And This is why i am asking another question.

Also as i can reproduce one the part of issue see on demo site is not working properly.

Look at this video: hidden link

3. How i can debug the translation process to be sure if its working or not?
3a. What hooks/actions is "in charge" (it means where is this part of code?) when the translation magic happens when this code works: echo esc_html__('Credit or Debit Card', 'oconnor-child');"

Shold i create new ticket for this particular question? And what exactly you cant understand in this question (3. and 3a)?

My plan is debug the hook/action when translation shold be apply in frontend and try to find out if there is some problem with another plugin or something which is related of this error.

I hope its more clear enough.

And please: If you dont understand something: cite my line of text and ask exactly what is about you cant understand.

Thank you.

October 7, 2019 at 5:17 pm #4709623

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your message.

I would like to reply directly to onwards your questions. I hope this is fine:

1. On my site String Translation is not working properly. It seems like no apply to the front end. I see translation and can do translate in admin section of WPML but its not apply to the frontend.

2. I can't recreate same issue on your demo website, so it mean its may NOT your problem or Not problem of WPML at all. But i need to be sure about this. And This is why i am asking another question.

Also as i can reproduce one the part of issue see on demo site is not working properly.

Look at this video: hidden link

- Thank you for providing the video. This issue seems to be theme related, as the header address line has been added from admin texts and translated.
I am so far not sure why the translation is working for Spanish but it´s not working for Russian.
Further, I am not able to edit the GT3 Header Builder on the Theme Options. The changes are not displayed on Front End and it neither works if WPML is deactivated.

I am escalating this issue to our compatibility team and I will be in contact as soon I received feedback.

3. How i can debug the translation process to be sure if its working or not?

- Enable the wp-debug feature to see if there are any current PHP errors given.

Add the following to your wp-config.php file:

define('WP_DEBUG', true);
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it.

If you open wp-config.php and that define statement is not there, you can add it right before this line:

/* That's all, stop editing! Happy blogging. */

You will be able to find a complete report inside of your wp-content folder. Look for a debug.log file and provide me the results.

More information about how to activate this feature you can find here:
https://wpml.org/documentation/support/debugging-wpml/

3a. What hooks/actions is "in charge" (it means where is this part of code?) when the translation magic happens when this code works: echo esc_html__('Credit or Debit Card', 'oconnor-child');"

- I am not quite sure how to answer this question, but you can find our Hook reference here:
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

Now, please provide me a list of all the theme-based strings that you spotted, which are not getting translated.

I will follow up with our compatibility team about the issues and if necessary we will reach out to the theme author in order to apply changes to their theme.

Kind regards
Andreas

October 8, 2019 at 9:14 am #4713459

sergeyS-14

Thank you Andreas, i glad we are clear now.

So when you pass this ticket to another department, i almos shure they know the answer to this question. (3a. What hooks/actions is "in charge" (it means where is this part of code?) when the translation magic happens when this code works: echo esc_html__('Credit or Debit Card', 'oconnor-child');"

- I am not quite sure how to answer this question, but you can find our Hook reference here:
https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/)

Please, beside of main problem with theme compatibility, tell them about this because its urgent for me to solve this issue asap... And may be if they give me answer to this question (3a)

And i can debug and figure out by my own what is the problem. And this will save time to resolve this problem for Both of us.

Thank you!

October 9, 2019 at 3:53 pm #4724265

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better for a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.
If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Kind regards
Andreas

October 11, 2019 at 10:57 pm #4741271

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Please add the following function to your parent-theme´s functions.php file:

In wp-content/themes/oconnor/functions.php replace line 1865:

$text_editor_content  = gt3_option_presets($preset, "text" . $index . "_editor");

with:

$text_editor_content  = get_option('oconnor')["text" . $index . "_editor"];

This solved the issue on our test site until the theme receives an update. I am following up with our compatibility team about include this function into your child theme, as my test with adding the complete function failed.

Kind regards
Andreas

November 5, 2019 at 1:21 am #4885441

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

We did not hear back from you.

Could you please confirm that the fix provided on 11th of October was able to solve the issue which had been escalated to our compatibility team?

Kind regards
Andreas