Irrelon / jquery-lang-js

i18n Allow instant language switching on HTML pages without reloading the page.
https://www.irrelon.com
362 stars 132 forks source link

Translating inline elements #106

Closed TamaraJug closed 6 years ago

TamaraJug commented 7 years ago

Hello! Please help.. I can't seem to find a solution. How should I translate this example: <p>This is <strong>highlighted part</strong> of text.

I tried: <p lang="en">This is <strong>highlighted part</strong> of text. <p lang="en">This is <strong lang="en">highlighted part</strong> of text.

Not working. Please help. Thank you!!

sheghzo commented 6 years ago

just remove strong tag,it should work!

Irrelon commented 6 years ago

you need to wrap your text sections in a span tag:

<p><span lang="en">This is</span> <strong lang="en">highlighted part</strong> <span lang="en">of text</span>.