Skip Navigation

[Closed] Toolset does not show translated elements (WPML)

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by Nigel 1 year, 10 months ago.

Assisted by: Nigel.

Author
Posts
#2528135

I'm setting up a multi language website. In the main language all views and filters are working fine.
Now I'm adding the french translations and Toolset views are showing some strange behaviours:

1. Filter dropdown "please select text" ("- Auswählen -") at initial page load does not change to the localization ("- Sélectionner -") until one of the available categories is selected.

2. The custom post types in WPML are set to "Translatable with fallback". If no translation is set, it shows the content in the main language (as expected). As soon as I translate a product category (custom post type "Produktkategorie"), the respective product category is not shown in the views anymore.

Link to the site: hidden link

Here an additional video to show the behaviour: hidden link

#2528327

Nigel
Supporter

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

Timezone: Europe/London (GMT+00:00)

Hi there

I watched the video and see the issues. I'm just slightly confused by whether categories are taxonomies or posts, and what it is the View displays and is being filtered by.

Would it be possible to get access to your site to check how you have this set up for clarity?

A staging site would be preferable, but we wouldn't need to make any changes, it is just to verify the set up so that we can try and reproduce the issue on a local test site.

Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

#2528599

Nigel
Supporter

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

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-01-06 at 15.22.28.png
Screenshot 2023-01-06 at 15.17.06.png

When I visited the page the filter labels (e.g. "Zielgruppen") are also not translated (in your video it shows "Groupes cibles").

In any case, because you are using the legacy Views editor, that means translating the View texts with String Translation.

If I go to WPML > String Translation and check the texts for the wpv-views domain (which is the context given in the wpml-string shortcodes in the filter editor of the View) I see that they are all listed as being in English, see the screenshot. (That's a common issue when the site default language is not English.)

You should change the language of those strings to specify that they are in German already. I expect that will fix anomalies with displaying the correct translated texts.

It looks like there is a similar issue with the taxonomy you are filtering by, where WPML thinks the taxonomy label and slug are English rather than German.

Can you fix that, too, and then see if the issue with filtering by the taxonomy persists?

#2530493

I changed the languages for the elements but still, the symptoms are completely the same..

#2530863

Nigel
Supporter

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

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-01-10 at 08.33.50.png
Screenshot 2023-01-10 at 07.59.25.png

OK, looking in String Translation for the Auswählen text shows that there are multiple occurences (one of which will be the string that appears in the dropdown), which are not translated and which are wrongly marked as English, as shown in the screenshot.

In the second screenshot you can see that the Types custom field wpcf-sortierung is set as not translatable, and that is why no posts are appearing when you choose a filter option on the French page.

The View is set to be ordered by values of this field. It is a quirk of WordPress queries (actually, the underlying MySQL queries) that if you order by some field, potential results which do not have a value for that field will be omitted from the results. Because of the WPML setting, any posts that you translate will not have a value for the field, and so will not appear in the results. You need to change the setting (probably to Copy), and you will have to translate the existing post again so that the field value gets copied over.

I'm not sure how well that will work with the WPML translatable-with-fallback setting; if the posts don't appear it could be that you would need to make a translation of the DE posts to FR (or, at least, duplicate them), but you can check that once you have made the above changes.

#2532943
Bildschirm­foto 2023-01-12 um 13.41.25.png

Hi Nigel

I changed all "Auswählen" strings to be German and made sure all are translated to French as well (see screenshot).
Now, it is staying German even if one of the French target groups ("Zielgruppen" / "groups cibles") are selected.

Furthermore I changed the custom field "wpcf-sortierung" to Copy and all others which potentially may have a translated content or used in the filters.
Then I actualized all translations and boom, the second part of the ticket seems to work as expected now.

May you please help me on the dropdown issue?

Thanks,
Andy

#2533707

Nigel
Supporter

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

Timezone: Europe/London (GMT+00:00)

Hi Andy

Sorry, I'm off today, I'll resume here first thing after the weekend.

#2535207

Nigel
Supporter

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

Timezone: Europe/London (GMT+00:00)

There are several entries for the View angebot-categories domain for the string - Auswählen - and so to confirm that it is the wpv-zielgruppe_default_label string we are dealing with (it should be), I edited the View and updated that default label to include an asterix to serve as a marker.

It appears as expected on the front end, but the String Translation table doesn't pick up the change in the string in the View, something is wrong there.

I'm going to have to take a copy of the site so I can install it locally to do some deeper testing...

...though I see that it's a sub-site of a multisite and I don't have permissions to be able to install a plugin to extract a copy.

Would that be possible?

The topic ‘[Closed] Toolset does not show translated elements (WPML)’ is closed to new replies.