Skip Navigation

[Resolved] String translation of a tag within a view loop

This thread is resolved. Here is a description of the problem and solution.

Problem:
I am trying to translate text strings inside a Toolset view loop, but it is not detecting the strings.

Solution:
To ensure the strings are detected and translated, you need to wrap the hardcoded strings within the Toolset View with the [wpml-string] shortcode. For example, instead of "Horas," you should write [wpml-string context="my-site"]Horas[/wpml-string]. This will allow you to see the string in WPML > String Translation and proceed with the translation.

Relevant Documentation:

https://toolset.com/documentation/legacy-features/translating-legacy-workflows/wpml-string-shortcode/

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.

This topic contains 2 replies, has 2 voices.

Last updated by hispavista-s.l.E 1 year, 5 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2614185
Captura de pantalla 2023-06-09 103000.png

Hi,
I am trying to translate text strings inside a Toolset view loop (attached screenshot).
Why is it not detecting the strings? I need this to work as soon as possible.

I have tried the "Find strings while processing pages" option and it is not what I need, I need it to find me the strings from the Toolset View, not from the front-end. Besides that it doesn't work.

I am waiting for your answer.

Best regards and good day.

#2614585

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

You need to wrap the string you hard code into a view with the [wpml-string] shortcode. So for example, instead of Horas you should write [wpml-string context="my-site"]Horas[/wpml-string].

Then you will be able to see the result in WPML > String Translation and translate it.

For more information:

https://toolset.com/documentation/legacy-features/translating-legacy-workflows/wpml-string-shortcode/

Thanks.

#2615045

My issue is resolved now. Thank you!