Skip Navigation

[Resolved] WPML string in Layouts Visual Editor cell

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

Problem:

The issue here is that when the user uses the [wpml-string context="my own context" name="my own stringname"]mystring[/wpml-string] shortcode the context and name attributes don't show up correctly in WPML String Translations. This only happens if they are used in the Visual Editor cell in Layouts.

Solution:

Unfortunately we don't have a solution at this time. However our development team has been aware of this issue and is currently working on fixing this.

This support ticket is created 6 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Daniel 6 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#617417

I use the wpml-string shortcode, e.g. [wpml-string context="my own context" name="my own stringname"]mystring[/wpml-string] in a Layouts Visual Editor cell.

Translation option is set to "Only text in [wpml-string] will appear for translation".

Then I go to WPML - String translation and find the string with the domain "layout-985" and name "s262_content_wpml-string_169319501261c644a58610f967e8f9d0".

So I can't use the shortcode context and name attributes in a Layouts Visual Editor cell? As far as I remember, it has worked before, and the behavior changed after a Toolset and/or WPML update.

What is the correct behavior nowadays and where is it documented?

#617571

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Daniel,

Thank you for contacting our support forum.

From this I gather that if you copy and paste the text to the layout, you're not able to translate the text correct?

Please let me know.
Thanks,
Shane

#617597
wpmlstring.PNG

Hello,

I'm not sure what you mean with copy and paste, can you please clarify?

I'll also make an attempt to clarify the issue. The translation is actually working per se, but I can't make use of the context and name attributes to the wpml-string shortcode. This makes it hard to find what to translate and I believe that the shortcode attributes were working last year.

Please find attached a screenshot where the top phrase comes from [wpml-string context="my own context 1" name="my own stringname 1"]string 1[/wpml-string] in a Layouts Visual Editor cell. You can also see that the attributes are working fine when the wpml-string shortcode is used in Content templates and Views.

#617609

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Daniel,

I see what you mean now.

I'll test this and see if i'm able to replicate the issue.

Thanks,
Shane

#617909

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Daniel,

Thank you, I was able to verify the issue and i've made a report to our team to see what is happening with this.

Is it that you just want to translate this particular string or the entire cell ?

Please let me know.
Thanks,
Shane

#617919

Hello,

For my current project, I just want to translate the strings marked with the [wpml-string] shortcode and I want to use the WPML String Translation view to translate everything. Hence I'm not using the WPML Translation Management feature.

As you've seen, this works fine when I use the shortcode in Content Templates and Views. The shortcode also works for Layouts Visual Editor cells, but with a big drawback, which is the missing ability to specify Domain and Name for the String Translation view.

I'm certain that your team will mention that it's working as expected when using the WPML Translation Management feature, but this is not what I'm looking for. I'm looking to translate the whole site (excl posts) right in the WPML String Translation view.

Thanks.

#618028

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Daniel,

We were able to identify the issue and a ticket for this has been created on our internal system for further review by our development team.

Not much that I can do from this point on.

Thanks,
Shane

#618031

All right, Shane. Thanks for looking into this and I hope it'll be fixed in the near future 🙂