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 non constant text #113

Closed mrgloom closed 6 years ago

mrgloom commented 6 years ago

Part of my html is generated from backend, so some strings are generated dinamically, is it possible to translate constant substring of dynamic string? For example: <span lang="en">Some text 34$</span> Where Some text is constant text and 34$ is variable text.

mrgloom commented 6 years ago

It can be done via regex: https://github.com/Irrelon/jquery-lang-js#define-a-language-pack