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.

This topic contains 17 replies, has 2 voices.

Last updated by malkaS 5 days, 14 hours ago.

Assigned support staff: Christopher Amirian.

Author Posts
April 17, 2021 at 10:35 pm #8562453

malkaS

I've got a view with lots of filters which are defined like this:

[wpv-control-postmeta field="wpcf-star" type="checkbox" title="[wpml-string context='gtm']Favorite branch[/wpml-string]" url_param="wpv-wpcf-star"]
[wpv-control-postmeta field="wpcf-accepting-credit" type="checkbox" title="Accepting credit" url_param="wpv-wpcf-accepting-credit"]
[wpv-control-postmeta field="wpcf-prepaid-card" type="checkbox" title="[wpml-string context='gtm']Prepaid card[/wpml-string]" url_param="wpv-wpcf-prepaid-card"]

For some reason, the last filter I've added (prepaid card), isn't translated at all. I've tried to set it up with [wpml-string] and without, it's the same. Other labels work fine.

On the string translations screen, I do see it and it's translated:

hidden link

Also, at loop I output it like this:

[wpv-conditional if="( $(wpcf-prepaid-card) ne '' )"]<div class=""><i class="far fa-credit-card"> [wpml-string context='gtm']Prepaid card[/wpml-string]</div>[/wpv-conditional]

And it also isn't translated. Although if I enable 'auto register strings for translation', it's translated. But the filter label still isn't translated.

April 20, 2021 at 9:20 am #8579191

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Would you please kindly follow the steps below?

- Go to "WordPress Dashboard > WPML > Theme and plugins localization > Localization options".
- There you most probably check the "Automatically load the theme's .mo file using 'load_textdomain'" checkbox.
- In the input box below that add "gtm" at the end of the list. (check the screenshot)
- Click the "Save" button.

See if that fixed the issue. If not, please follow the steps below:

- Create a backup of your website. You can use backup tools from WordPress: https://wordpress.org/plugins/tags/backup/
- Go to "WordPress Dashboard > WPML > Support > Troubleshooting (link)".
- Click the "Show Custom MO Files ...." button.
- A pop up will show and click the generate MO files.

See if it fixes the issue.

Thank you.

Screen Shot 2021-04-20 at 13.19.39.png
April 21, 2021 at 6:58 am #8587543

malkaS

1. Automatically load the theme's .mo file using 'load_textdomain was disabled. I've enabled it and it didn't help

2. Troubleshooting page is almost empty, which is weird. I remember it was full of buttons in the past
hidden link

3. Apparently, using [wpml-string] inside controls breaks the filtering, so I had to removed them completely.

[wpv-control-postmeta field="wpcf-russian-speaker" type="checkbox" title="Service in Russian" url_param="wpv-wpcf-russian-speaker"]
[wpv-control-postmeta field="wpcf-accessible-branch" type="checkbox" title="Accessible" url_param="wpv-wpcf-accessible-branch"]
[wpv-control-postmeta field="wpcf-open" url_param="wpv-wpcf-open" title="open"]
[wpv-control-postmeta field="wpcf-star" type="checkbox" title="Favorite branch" url_param="wpv-wpcf-star"]
[wpv-control-postmeta field="wpcf-accepting-credit" type="checkbox" title="Accepting credit" url_param="wpv-wpcf-accepting-credit"]
[wpv-control-postmeta field="wpcf-prepaid-card" type="checkbox" title="Prepaid card" url_param="wpv-wpcf-prepaid-card"]

And now I see 4 translations only when I check 'Look for strings while pages are rendered', and 2 always:
hidden link

April 21, 2021 at 11:19 am #8590039

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

It seems to be a problem with your WPML installation and you mentioned that the Troubleshooting is empty.

Also, it might be a plugin conflict issue.

- Create a backup of your website. You can use backup tools from WordPress: https://wordpress.org/plugins/tags/backup/
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except Toolset, WPML and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

Finally, please go to String translation and select the strings in question and delete them.

Then go to WPML > Theme and plugins localization and re-scan Toolset.

Go back and try to translate the strings.

Thank you

April 25, 2021 at 10:34 pm #8618871

malkaS

I've got a staging site with the same issue. I've even tries to remove 'title' attribute from filter controls, assuming that WPML should translate the field name there, and I see it at string translation, but it doesn't work. Can you take a look?

April 25, 2021 at 10:35 pm #8618899

malkaS

I've disabled all plugins there besides WPML and Toolset, and it looks the same. Btw, WPML troubleshooting does work there...

April 27, 2021 at 7:05 am #8630921

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for all the details. SO as you already exhausted all the steps that mentioned and the Troubleshooting steps also did not work on the staging website this might be a compatibility issue that needs to be reported.

To be able to report the compatibility issues we need to replicate the issue on a clean installation.
I created a clean installation of WordPress, WPML, and all necessary WPML add-ons and Toolset Types and Blocks.
You can access the WordPress dashboard using the link below:
hidden link

Kindly try to add a somewhat similar scenario and try to translate. I also used the Toolset settings to enable the legacy Views so that you can use that as it seems you use that mode.

This will help us to report the probable issue to the compatibility team and solve the possible problem faster.

Thank you.

May 1, 2021 at 10:08 pm #8668713

malkaS

I couldn't reproduce this issue at your site. Can you take a look at my staging site?

I'm now just trying to use controls without titles at all, so that toolset field title would be used and translated. I see that once I enable 'auto-register for strings', translation works, but when it's disabled, translations doesn't work (just shows the original title).

May 2, 2021 at 9:58 am #8670097

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for the information. So this seems to be something unique to your installation.

I'd appreciate it if you could give me the URL/User/Pass of your staging WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

The next reply will be private so that you can provide the login info securely.

Also, please tell us which page or content template to check and search for which text.

Thank you.

May 4, 2021 at 11:17 am #8683683

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for the info. I checked the website and encountered the error mentioned in the image attached.

You will need to install the translation management plugin to make sure it is possible to set the fields as translatable.

Would you please kindly install the Translation Management plugin to follow up?

Thank you.

Screen Shot 2021-05-04 at 15.19.28.png
May 4, 2021 at 9:57 pm #8689059

malkaS

installed

May 5, 2021 at 1:52 pm #8695321

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Thank you very much.

I reported this to the second-tier support. Going to get back to you a soon as I have an update.

Thank you.

May 16, 2021 at 11:12 am #8773721

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I just wanted to update you that the issue is still under review and till now we checked if there is a problem with MO file generation which it is not.

Also we installed the File Manager and all in one migration plugins on the staging website to help us investigate the issue further.

I will inform you if we have an update.

Thank you.

May 27, 2021 at 6:38 am #8856747

malkaS

Any news?

May 27, 2021 at 11:23 am #8859863

Christopher Amirian
Supporter

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

Thank you for the follow up. I have an answer from the second tier and here is what they mentioned that I'd appreciate it if you follow:

- Update the Toolset plugins to the latest version (There are new versions both for Toolset Types and Toolset Views)
- Go to WPML > Theme and Plugin Localization / Check the "Automatically load the theme's .mo file using 'load_textdomain'" box / Add "plugin Types" to the field then save
- Edit the custom fields, and set the original field name on ENGLISH language (not Hebrew)
- Go to WPML > String Translation and translate the custom field names from ENGLISH to HEBREW (And also other languages) (You need to search in English and the result should have the "plugin Types" text domain)
- Go to the "edit view" screen, do a small modification and save
- Check the fields on front-end

See if it works ok for you now.