Skip Navigation

[Resuelto] How to translate [wpv-post-status] with WPML?

This support ticket is created hace 2 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: 

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Dido hace 2 años, 7 meses.

Asistido por: Waqar.

Autor
Mensajes
#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

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

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!