VvvebJs
VvvebJs copied to clipboard
i18n
Add I18n
Thank you for your pull request, it looks like a lot of work.
The only thing that I think is too complex and harder to maintain and translate is the approach used by the translation library to use unique id's for each string like i18n('common.widthProperty'),
I find gettext https://github.com/guillaumepotier/gettext.js/ approach simpler and easier to maintain and translate, as it does not need to create id's, the original english text can be used instead i18n.gettext("Width").
And for [data-i18n-text], [data-i18n-label] etc dom elements innerText/attribute value can be used directly.
If it's possible to adapt the code to use gettext I can merge the changes.