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?
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
Hi Waqar,
I tried this, but it is not working yet.
I visite the front page several times.
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.
My issue is resolved now. Thank you!