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 14 replies, has 3 voices.

Last updated by margitE-2 1 year, 11 months ago.

Assisted by: Nigel.

Author Posts
December 9, 2022 at 9:34 am #12619819

margitE-2

Hello!

I have a problem with WPML translating pods custom fields for posts table pro plugin. I have custom post type with series of different custom fields, that make up the columns on posts table pro table. Now I have set up all the settings accordingly, but the fields do not show up on string translation, nor the posts (that I have translated) show on english language. I have Estonian and English languages.

I can provide you a access, so you can maybe take a look?

Best regards,
Margit

What is the link to your site? - hidden link

December 12, 2022 at 1:16 pm #12635033

Nigel
Supporter

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

Hi there

To translate custom fields you first need to make sure they are set as translatable (or if you only need the values copied across without actually translating, set them to Copy).

Then the translation of the custom field values themselves happens when you translate the content the fields belong to.

So if you have custom fields belonging to posts of some custom post type, for example, then when you send the posts for translation, the custom fields will be available for translation at the same time (if they are marked for translation).

Go to WPML > Settings > Custom Fields Translation to double-check the settings for your custom fields. (Note, WPML will only find the fields to offer settings where there is stored data for the custom field. It's not enough just to register a custom field in Pods, you must also save some content so that WPML can detect the field from the entries in wp_postmeta.)

Note, String Translation is not involved in this process. It is specifically for translating texts from plugins and themes or WordPress itself, not for translating site content.

December 13, 2022 at 3:12 pm #12643531

margitE-2

Hi

So I checked everything you mentioned before, but still for some reason, if I start translating the estonian version of the page with the posts table and custom fields, they do not show up in the translation. I checked the settings and set all the custom fields to "Translate". Also most of the custom fields have data stored in them, so that cant be the reason either.

Can I maybe give you a temporary login credentials so you could take a look?

December 13, 2022 at 4:08 pm #12643937

Nigel
Supporter

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

Sure, let me mark your next reply as private to get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete.

A staging server would be preferable, but in any case be sure to have a current backup of your site.

Can you also provide some steps for me to see the problem.

December 14, 2022 at 4:37 pm #12651999

Nigel
Supporter

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

I've taken a look at your site and I'm familiarising myself with your set up and with the table plugin (which I haven't used before).

Before I dig deeper, can I double-check that I'm understanding what the issue is?

I've uploaded a screenshot of the English page.

Some of the content—i.e. the text which comes from the post excerpt—is displaying in English, but the column headers are in Estonian. That is the one thing that needs translating.

Also the content of the "Tegevusvaldkonnad" column looks like it is not translated.

Those are the issues we are concerned with?

(Note, as shown in the second screenshot for airBaltic, the reason some of the post excerpts are showing in Estonian appears to be because the language of the posts is mis-recorded; see the second screenshot, where the Estonian text is labelled as English, and vice versa.)

Lastly, how is that the columns in the settings include more columns than are shown on the front end?

(The columns setting is: image:Ettevõtte logo,title:Ettevõtte nimi,excerpt:Ettevõtte kirjeldus,cf:tegevusvaldkonnad,cf:pakkumised,cf:telefoninumber,cf:veebileht,cf:meiliaadress,cf:facebook,cf:instagram,cf:linkedin,cf:ekspositsiooni_hall,cf:stendi_number)

Screenshot 2022-12-14 at 16.31.00.png
Screenshot 2022-12-14 at 16.29.42.png
December 15, 2022 at 9:18 am #12655687

margitE-2

Okay, so the Airbaltic text was inserted as an english text, before translations. This needs to be switched around aswell. So english shows on english page and estonian on estonian language.

Exactly the columns are not translated and the "Tegevusvaldkonnad" aswell.
The columns in the settings are correct. They also show in the front-end, but to see those fields you need to click on the green cross icon or the "Ettevõtte logo" column, which will reveal all the other fields.
Because of the fact there are so many columns its not possible to show all the columns at the same time.
But to sum up, you are right on the problems, that need to be fixed.
1. Airbaltic language needs to be changed to show the right content at the right language.
2. Get to translate "Tegevusvaldkonnad" values.
3. Translate the custom field columns of Posts table.

December 15, 2022 at 4:35 pm #12659361

Andrés
Supporter

Languages: English (English ) Spanish (Español ) French (Français )

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

Hello there,

Just to let you know that we are still checking this issue. Nigel will get back to you soon.

Thank you for your patience.
Regards

December 16, 2022 at 11:56 am #12664169

Nigel
Supporter

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

Hi there

Sorry I was ill yesterday, I'm looking at your site now.

For the column headings, I went to WPML > String Translation and searched for some of the text added as a column heading and found what looks to be the text you need to translate to English, see the screenshot.

(The way the table plugin stores the column headers is in a single string; you added it in that format in Estonian, I assume you can maintain the same format when you translate the Estonian texts to English.)

Now regarding the texts from the "Tegevusvaldkonnad" field.

It's a custom field, so it should be set as translatable, and then when translating posts that have values for the field it will be offered for translation.

When I go to WPML > Settings > Custom Fields Translation and search for the field, I think perhaps the same field name has been used more than once on the site: the field I find is set to translatable already, but when editing one of the translations for a Osalejad 2023 post, the field isn't offered for translation.

So I enabled the "show Multilingual Content Setup meta box on post edit screen" setting, and now when editing a Osalejad 2023 post I can see the settings for the custom fields from that post. And as you can see in the second screenshot, the field was set as not translatable (and hence not offered for translation).

I changed that to translatable, and I then re-edited the translation, where you can see in the last screenshot the field is now offered for translation.

(Note that you must make a minor edit to the post and send then send it for translation again, otherwise editing the translation you'll just see the same content offered for translation as when the previous translation job was created.)

As for the posts such as Airbaltic where the texts are in the wrong language, I don't know how that would have arisen.

I'll have to have a think about fixing that. Please review the above and I'll get back to you again (though it may be Monday, I'm not actually working today).

Screenshot 2022-12-16 at 11.39.45.png
Screenshot 2022-12-16 at 10.25.46.png
Screenshot 2022-12-16 at 10.05.43.png
December 16, 2022 at 4:24 pm #12666205

margitE-2

Thanks alot for the info and help!
"(Note that you must make a minor edit to the post and send then send it for translation again, otherwise editing the translation you'll just see the same content offered for translation as when the previous translation job was created.)" -- So about this, I just need to take the post and make a minor edit, save it and try to translate it again?

About the airBaltic post. As it was initially added to "Estonian" language as english. I think that is changeable via the post. So I can change the language type from the post itself to English. So that way the languages should be fixed.
Okay..right now I can see that its not possible to change the language for this post.
I think the easiest way would be to just re-enter the data?

Screenshot 2022-12-16 at 18.18.49.png
December 16, 2022 at 4:27 pm #12666233

margitE-2

Sorry, I forgot one thing. The last screenshot you added, in the string translation about the custom fields. I tried translating them via string translation, but with that solution the custom fields values were not shown at all in the English language of the page. As the custom fields are not the same as in estonian. Or now after the translating the values it should show in english also?
Feel free to correct me, as I maybe misunderstood something 🙂

December 19, 2022 at 8:46 am #12674155

Nigel
Supporter

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

First, regarding the AirBaltic post (and any similar posts), it should be possible to fix within the UI, but it won't hurt to take a backup in case something goes wrong.

Edit the post in the default language. Use the language switcher in the toolbar to switch the editor to the secondary language (there will be a warning dialog, edit anyway).

In the sidebar language settings, where it says this is a translation of, change that to None, to disconnect the two versions of the page.

Now that they are disconnected you should be able to change the language of each of them, and then reconnect them using the "this is a translation of" setting, from the secondary language.

Second, regarding the custom fields used for the column headings, you shouldn't translate what you enter for the custom fields, because they are the field slugs that the custom fields are defined with in Pods, you wouldn't translate the slugs (which is the meta_key used to store the data in wp_postmeta).

But, having said that, I don't know where the text for the column headings come from.

Take the custom field with a slug tegevusvaldkonnad.

If you edit the field definition in Pods you will see its label is not "Tegevusvaldkonnad" (which is what is shown as the table column heading), but "Tegevusvaldkonnad/Fields of activity".

(Even so, that label is a Pods-specific definition, and I doubt the table plugin is aware of it.)

Perhaps the table plugin just capitalises the first letter of the custom field slug.

Or do you know of somewhere else where the column heading label is entered?

If not I might need to take a copy to work on locally to try and identify the source of the text, to know how it can be translated.

/Fields of activity

December 20, 2022 at 11:32 am #12683281

margitE-2

Thanks for the info!
I got the AirBaltic post in place 🙂

Regarding the column headers, I don't think it just capitalises the first letter of custom fields slugs. Otherwise for example "stendi_number" would be shown as "Stendi_number" instead of "Stendi number". But I am not sure to be honest. Now to think about it and check, then meiliaadress label is E-mail, but on the column it shows Meiliaadress, so I think you are correct. 🙁
Are there any solutions to this problem?

December 20, 2022 at 3:54 pm #12685717

Nigel
Supporter

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

I looked at their documentation to see what information they have about column headings, and it looks like you can specify what text to use for the column heading, including for custom fields.

See the "Choosing your own column headings" section of this page: hidden link

tl:dr; specify the text for the label after a colon, like so:

cf:valuation:Sale Price (£)

So you should be able to update the column settings to use some specific text, and then use String Translation as described before to provide translated alternatives.

December 22, 2022 at 10:15 am #12699391

margitE-2

Thanks! I will try that!

It seems, that I got what I needed to work, so thank you!
I will mark this issue as resolved 🙂