claudetech / node-static-i18n

HTML static pages i18n tool
https://www.npmjs.com/package/static-i18n
MIT License
104 stars 21 forks source link

Added interpolateSelector option #16

Closed alvarotrigo closed 6 years ago

alvarotrigo commented 6 years ago

Fixing problems reported in https://github.com/claudetech/node-static-i18n/issues and https://github.com/claudetech/node-static-i18n/issues/15

It allows to do something like:

<div data-t-interpolate data-t>
    {{Download}} <a href="whate">whatever</a> {{file}}
</div>

As well as use indentation such as

<div data-t-interpolate data-t>
    {{Download}} 
</div>

Or translating text without direct wrapper:

<div class="demo" data-t-interpolate>
    <div class="loading"></div>
    {{My text here}}
</div>
danhper commented 6 years ago

Great, thank you!

danhper commented 6 years ago

I just published a new version to npm, thanks again!