Skip Navigation

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.

Tagged: 

This topic contains 12 replies, has 2 voices.

Last updated by Dražen Duvnjak 7 months, 1 week ago.

Assisted by: Dražen Duvnjak.

Author Posts
April 29, 2024 at 7:40 am #15575159

Ton

IN addition to this ticket https://wpml.org/forums/topic/review-language-translation-is-empty/page/2/ i have small other problem

The automatic translatiohn works. But it also translates the names of the row layouts in ACF. So in my code i have this

include(locate_template('components/' . get_row_layout() . '/' . get_row_layout() . '.php'));
Bit that doesn't work because it translated the the get_row_layout, wich it should not have done. How to prevent this / fix this?

April 29, 2024 at 8:03 am #15575365

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

I have created a test site. Please create 1 field group and 1 post, then translate it and share with me what part is being translated in the WPML editor but should not be.

- hidden link

Please do not install any other plugins or add custom code, if not necessary.

Thanks,
Drazen

April 29, 2024 at 8:04 am #15575366

Ton

Just looked, it's not just the row layout names, it's also still translating the fieldnames themself.

I already have define( 'ACFML_EXCLUDE_FIELD_GROUP_STRINGS_IN_POST_JOBS', true ); added.

I did not translate anything BEFORE i added this code.

April 29, 2024 at 8:34 am #15575579

Ton

Hello Drazen,

I need ACF pro for the flexible content to at least mimic my setup.
Can you fix this?

April 29, 2024 at 8:36 am #15575581

Ton

Also multiple fields did not even make it in the translation if I look at it now.
But 1 problem at the time.

April 29, 2024 at 9:13 am #15575850

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

yes, one thing at a time and one issue per ticket, please.

Let's check the one you originally reported. I have added ACF Pro.

Regards,
Drazen

April 29, 2024 at 10:16 am #15576343

Ton

I have set it up.
Now it doesn't show the content on the front end, but thats OK i think.
Now When you look at
hidden link

There it says "content_1_koloms"

And here:
hidden link

It says "hoofdkop" for example.

Now these values get translated on my webiste despite the define in the wp config.
How to revert this or to overcome this this doesn't happen?

(content_1_koloms gets loaded via PHP in the flexible content of Pagina).
This way I can do this:
include(locate_template('components/' . get_row_layout() . '/' . get_row_layout() . '.php'));

So create compnents for all my rows. But if the row layout name gets translated, ofcourse my code doesn't work anymore.

April 29, 2024 at 11:54 am #15576921

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

I understand the problem, but as I have said this is not being translated in any way by WPML, or at least not out of the box, as you can see in the test site. In the WPML ATE editor for translation, you can only see labels, which is not the same as the field name.

Can you replicate this problem on test site, or show me where and how are that name, for example, "content_1_koloms", translated?

Regards,
Drazen

April 29, 2024 at 12:39 pm #15577198

Ton

Hello Drazen,

Well no I cannot on hidden link somehow.
But that doesn't change the fact that it did do this on my website.

That's why I say, i am more than happy to create a copy of my website to check why this happens. Or give you access to the live site only check what might be going on.

In my german translated website, it tries to retrieve this:
include(locate_template('components/' . get_row_layout() . '/' . get_row_layout() . '.php'));

Where in my original language the get_row_layout = 'header'
But in the german language all the sudden it is 'Kopfzeile'.

Yet when I try to search for Kopfzeile it's nowhere to be found anywhere in WPML functions.
But I did find it in the "_postmeta" table. There it say this:

a:12:{i:0;s:9:"Kopfzeile";i:1;s:24:"inhalt_rechts_bild_links";i:2;s:16:"Inhalt_1_Spalten";i:3;s:7:"divider";i:4;s:4:"usps";i:5;s:16:"Inhalt_1_Spalten";i:6;s:7:"divider";i:7;s:12:"Menschen_von";i:8;s:16:"Inhalt_1_Spalten";i:9;s:7:"divider";i:10;s:16:"geschichte_block";i:11;s:24:"inhalt_links_bild_rechts";}

As you can see, a whole lot of names got translated...

This must have some explaination somewhere right?
Owh and in the ATE editor, of my live site, it DOES show these elements...

For your info: The pages and ACF were already created before I activated WPML etc.

Hope to hear from you.
Kind regards

April 29, 2024 at 12:50 pm #15577243

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

difficult to say without checking, could be some configuration is wrong or some custom code causing issue or similar.

Before we continue can you please follow next:

1) In order to expedite handling your support requests, can you please share WPML support debug information from your site.

- To give debug information, login to your site and go to WPML → Support. From there click on the “debug information” link at the bottom of the page.
- Once on the “debug information” page, select the entire content of the text box and copy it.
- Now go back to our support forum, find debug information box and paste it.

More information on the link: https://wpml.org/faq/provide-debug-information-faster-support/

2) Please check if the issue still happens when you are using the WP default theme, only WPML plugins and ACF enabled all other are disabled, and if it happens with newly fresh created ACF fied groups / and/ or old ones.

Let me know how it goes.

Regards,
Drazen

April 29, 2024 at 1:28 pm #15577371

Ton

I added the debuginfo.
Tomorrow I will create a test setup of my site and do it with the bare minimum to check if it still happens.

I will get back to you.

April 29, 2024 at 5:35 pm #15578449
Ton

Hello Drazen,

I fiddled around with the database and reverted the weird translations for my site.
This showed more content already.

Than I updated the pages, with no real content changes, this fixed it even more.

After a few changes in my theme, I managed to get it 99% working.
There is 1 more thing I need to fix.

I have 2 custom menu-items in my menu.
These somehow are not translated, could you assist me with this?

Kind regards

New threads created by Dražen Duvnjak and linked to this one are listed below:

https://wpml.org/forums/topic/split-translating-2-custom-menu-items-in-my-menu/

April 30, 2024 at 6:04 am #15579268

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

glad to hear that.

We limit 1 issue per 1 ticket, to keep things clear and easy to follow. I have opened a new ticket for your new issue:

- https://wpml.org/forums/topic/split-translating-2-custom-menu-items-in-my-menu/

Since the original issue of this ticket is resolved I advise closing this one and continue our conversation in the new ticket.

Regards,
Drazen

April 30, 2024 at 8:32 am #15579914

Ton

Fixed it myself.