 matthewL-3
|
Hi
On the homepage - hidden link you can see the country flags
But on a translated version you can't hidden link
This is a Toolset view, I am guessing it needs translating but how do I do that?
The homepage is showing as fully translated and Toolset views don't have the option to translate in Translation Management?
This is a Toolset view using the old editor not the block editor as the block editor does not support taxonomy yet.
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
Hi there
As you may be aware, the Toolset View block is integrated with WPML so that when translating a page containing such a View all of it's texts are offered for translation.
With the legacy View editor you translate texts by wrapping them in the wpml-string shortcode (see https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpml-string), and then locating them for translation in String Translation.
But in your case the problem looks different.
When switching to the Spanish page, the View doesn't find any results. That means that the content being queried (maybe you have a "flag" custom post type) has not been translated, and so there are no results to show on the Spanish page.
So you will first need to translate the "flag" content, and then worry about translating any strings output by the View, by using the wpml-string shortcode.
|
 matthewL-3
|
Ah I see it’s not that though because the flags are just the default WordPress categories and they have been translated.
Any other thoughts what it could be?
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
Hmm. I set up a local test site and I'm seeing something similar.
I need to dig into this a little further to see if I can spot what the problem is.
Please bear with me, I'll get back to you when I have some news.
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
It may just be a caching issue.
On the page where you have inserted the shortcode for the Toolset View (including on the translated page), add the cached="off" attribute to the wpv-view shortcode.
If your categories are translated double-check that the translated categories are assigned to some posts so that the term count is not zero.
|
 matthewL-3
|
No same issue still and the categories are translated and definitely have posts.
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
Could I take a look at your site?
I'll want to temporarily add one or two plugins to aid with debugging, if that's okay.
Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
Thanks for that, but I can't log in, it looks like you have an additional security layer, and maybe a misconfigured reCaptcha?
|
 matthewL-3
|
Sorry about that resolved that for you!
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
OK, I spotted a couple of things, the first is simply that you missed a quote when adding the cached="off" attribute, which I fixed on this site copy.
That didn't resolve the problem, but I see the cause of it is that you are ordering your View by a term meta field (clean country name), and that that field is set to not translate.
That means that the translated categories have no value in the database for that field, and it is a quirk of WordPress that if you order a query (in this case a taxonomy query) by something, potential results that have no value for that thing are omitted.
|
 matthewL-3
|
ah of course I totally forgot I changed that! thank you! I have moved this to be translated now but I can't for the life of me figure out how to translate it?
The page does not flag it still as needing translation, can't find it in translation management or in strings. (made this change on the live site to try and do it).
Also I fixed the cached tag on the live site.
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
If you have marked the taxonomy custom term meta for translation then when you edit term translations via WPML > Taxonomy translation you will see the term meta offered for translation (screenshot is from my own test site).
You can re-send content that has the categories assigned for translation to have the term meta translated, and there is a simple trick to translate them all in one go as described here: https://wpml.org/faq/how-to-translate-all-taxonomy-terms-at-once/
|
 matthewL-3
|
We are closer but the flag images are not showing up now.
See: hidden link
Any ideas why this might be?
|
 Nigel
WPML Supporter since 02/2016
Timezone:
Europe/Madrid (GMT+02:00)
|
Did you also change the translation settings for the wpcf-country-flag custom term meta in WPML > Settings?
In your staging site it is still set as do not translate, and I expect you will want to set it as Copy for an image url.
|
 matthewL-3
|
Yes but only recently is there a way to trigger the system knowing about this change?
I changed resaving the page but that made no difference.
|