谢谢您的阅读。
我是一个新手,正在学习 polymer/lit-element,lit-html。我开始使用 PWA starter kit. 但令我惊讶的是它不使用 polymer 元素,而是 lit-elements。
我尝试应用https://polymer-library.polymer-project.org/3.0/docs/apps/localize中提供的默认 app-localize-behaviour,但没有成功。
在 PageViewElement 中使用 mixinBehaviors 似乎会出问题。
我看到同时出现了几个新兴的库,例如:https://github.com/andreasbm/lit-translate 和 https://github.com/hamedasemi/lit-element-i18n。所以,我必须承认我现在迷失了方向,应该如何使用 lit-element 和 lit-html 进行国际化或本地化。
是否有任何推荐的库?我错过了关于官方推荐方式的文章吗?
提前感谢您,并祝您拥有愉快的一天。
我是一个新手,正在学习 polymer/lit-element,lit-html。我开始使用 PWA starter kit. 但令我惊讶的是它不使用 polymer 元素,而是 lit-elements。
我尝试应用https://polymer-library.polymer-project.org/3.0/docs/apps/localize中提供的默认 app-localize-behaviour,但没有成功。
在 PageViewElement 中使用 mixinBehaviors 似乎会出问题。
mixinBehaviors([AppLocalizeBehavior], PageViewElement)
最终出现了类型错误:
TypeError: this.constructor._classProperties is undefined
我看到同时出现了几个新兴的库,例如:https://github.com/andreasbm/lit-translate 和 https://github.com/hamedasemi/lit-element-i18n。所以,我必须承认我现在迷失了方向,应该如何使用 lit-element 和 lit-html 进行国际化或本地化。
是否有任何推荐的库?我错过了关于官方推荐方式的文章吗?
提前感谢您,并祝您拥有愉快的一天。