Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 8:00 – 12:00 6:00 – 12:00 -
- 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 13:00 – 17:00 13:00 – 15:00 -

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

This topic contains 1 reply, has 2 voices.

Last updated by Nicolas V. 1 year, 8 months ago.

Assisted by: Nicolas V..

Author Posts
September 27, 2023 at 3:53 pm #14475809

genevieveT-3

Tell us what you are trying to do?
Use paragraph, breaking row and strong (or bold) HTML elements/tags in String Translation

Is there any documentation that you are following?
I tried the snippet here but it didn't work : https://wpml.org/errata/visual-text-toggle-removes-paragraph-tags-on-translations-and-shows-on-one-line/

September 28, 2023 at 2:56 pm #14482877

Nicolas V.
Supporter

Languages: English (English ) French (Français )

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

Hello,

Welcome to the WPML support forum. Let's start by meeting WPML's minimum requirements because it could impact your translations. I've noticed your website has a low PHP memory allocation (40M). The minimum requirement for WPML is 128M but we recommend 256M:
- Access your server via FTP and open wp-config.php (in your WordPress root directory).
- Insert those lines just before /* That's all, stop editing! Happy blogging. */

/* Memory Limit */
define( 'WP_MEMORY_LIMIT', '256M' );

More info: https://wpml.org/home/minimum-requirements/

---

Now regarding your question, could you please elaborate a little bit more?

String Translation will allow you to translate any string, it could even be a shortcode or a code snippet.

I did a quick example for you:
- I added the following code in my footer.php template:

<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?= __('<p>Lire <strong>plus</strong><br> lire encore</p>', 'test_hmtl_markers') ?> "</a>

- As you can see the string inside the __() function has html markers
- If I go to "WPML > String Translation", I'm able to translate it (see screenshot)

screenshot-2023.09.28-09_54_45.png

The topic ‘[Closed] Use and (or ) in String Translation’ is closed to new replies.