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

Unable to translate text with html tags #84

Closed Et3rnal closed 7 years ago

Et3rnal commented 8 years ago

Hi,

Thanks for the great plugin, I have a small problem when the plugin dont translate text that has any html tags on and iqnore them unless I remove the tags.

ex:

This < b >APP< / b > can do a lot of things.

now this will not be translated unless I remove the < b >< / b > tags?

Am I doing anything wrong?

missaq commented 8 years ago

Same problem with
tag. Did you find a solution?

Et3rnal commented 8 years ago

Nop, i just end up using the data-lang-token in each tag and removed all my formatting tags :|

HansZwetslootAktionAktivAnarkist commented 8 years ago

I write in English but my native language is Swedish. Would help work if Change to Swedish?

codyellingham commented 8 years ago

@Et3rnal @missaq @HansZwetslootAktionAktivAnarkist I started a fork that can read HTML entities from the JSON here. Only limitation is that it does not correctly overwrite the original language if there are innerHTML elements, but I am working on it.

Irrelon commented 8 years ago

Hi I'm the original developer of the plugin. The plugin was designed for use in web applications / hybrid mobile applications that need to add l18n text translations to buttons, controls, titles, dialog boxes etc. While it can translate very large or long text sections, it was not intended to translate HTML, only pure text.

In cases where you have a whole page and you are not writing a web application, you are better off providing multiple versions of the page for each language and making your own switching links.

HansZwetslootAktionAktivAnarkist commented 7 years ago

I long for something to happend at my aerolab site. I dont able to manege myself

HansZwetslootAktionAktivAnarkist commented 7 years ago

aerolab,github. Helpanalyse and get back to me. Hans Z