Skip Navigation

[Gelöst] How to translate [wpv-post-status] with WPML?

This support ticket is created vor 2 Jahre. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 4 Antworten, has 2 Stimmen.

Last updated by Dido vor 2 Jahre.

Assisted by: Waqar.

Author
Artikel
#2345515
status.JPG

Hi,

in a view I can show published items and drafts.
I want to show this in the frontend, but I see the words pulish and draft.
Since my site is in Dutch I want to translate these words.
I can't find these strings in WPML. What to do with this?

#2345833

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

Have you tried adding this shortcode, inside the "wpml-string" shortcode?
( ref: https://wpml.org/documentation/support/wpml-coding-api/shortcodes/#wpml-string )

Example:


[wpml-string context="wpv-views"][wpv-post-status][/wpml-string]

Any text/string included within this shortcode is made available for translation, but, you'll have to make sure to visit the front-end page, at least once, after including this shortcode.

regards,
Waqar

#2345883
transl.JPG

Hi Waqar,

I tried this, but it is not working yet.
I visite the front page several times.

#2347167

Waqar
Supporter

Languages: Englisch (English )

Timezone: Asia/Karachi (GMT+05:00)

I've performed some tests on my website and I was able to show the translated text for each post status, using individual conditional statements, for example:
( ref: https://toolset.com/documentation/legacy-features/views-plugin/using-shortcodes-in-conditions/ )


[wpv-conditional if="( '[wpv-post-status]' eq 'draft' )"]
[wpml-string context="wpv-views"]Draft[/wpml-string]
[/wpv-conditional]

[wpv-conditional if="( '[wpv-post-status]' eq 'publish' )"]
[wpml-string context="wpv-views"]Published[/wpml-string]
[/wpv-conditional]

You can add the translatable text strings for each post status and then they will start showing in the WPML's string translation section.

#2348481

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.