Skip Navigation

[Resolved] wpml_context attribute in wpv-post-read-more doesn't appear to work correctly

This support ticket is created 2 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by simonM-5 2 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2336829

Dear Support

I am trying to:
Use the wpv-post-read-more shortcode with wpml_context argument. (https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-read-more)

I have tried with the following 3 variants: (1) underscore as in the documentation, (2) with hyphen, (3) with just "context" as is the case in with [wpml-string] shortcodes, but none of them works:
[wpv-post-read-more wpml_context="toolset-content-templates-22271" label="Read more ..."]
and
[wpv-post-read-more wpml-context="toolset-content-templates-22271" label="Read more ..."]
and
[wpv-post-read-more context="toolset-content-templates-22271" label="Read more ..."]

Link to a page where the issue can be seen:
Compare EN: hidden link
to DE version: hidden link
from Content Template "Loop item in Blog Entry Search and Results View" (ID 22271)

I expected to see:
"Read more ..." translated to "Weiterlesen ..."

Instead, I got:
"Read more ..." remains untranslated on the German page hidden link, although the String translation entry "page-builder-shortcode-strings-22271" was registered and translated in WPML String Translation.

Furthermore, no string translation entry was registered in WPML String Translation for my custom context "toolset-content-templates-22271" either.

Kind regards
Simon

#2336889

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

It seems the "wpml_context" attribute is no more in use with new translation workflow. I've registered the string with the [wpml-string] shortcode as given under on your content template:
=> hidden link

[wpv-post-read-more wpml_context="toolset-content-templates-22271" label="[wpml-string context='wpv-views']Read more ...[/wpml-string]"]

And I can see the string is registered at String Translation and I've translated it. I can see the translated string on German language page.
=> hidden link

#2337587

Hi Minesh

I had already tried something like you have done here, but I think I must have screwed up the single quotes and double quotes. :-/ I removed the wpml_context argument altogether since it no longer works and it is still translating correctly.

[wpv-post-read-more label="[wpml-string context='wpv-views']Read more ...[/wpml-string]"]

Can you please have the documentation updated to remove that argument from the wpv-post-read-more documentation?

Thanks and regards
Simon

#2338591

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I will discuss this with our Lead (when he back from vacation) and take the next steps. You are welcome to mark resolve this ticket.

#2338705

My issue is resolved now. Thank you!