Hi I tried use lit-translate but only works in typescript environment and all the application to translate is writed in javascript :( :(
On Thursday, February 7, 2019 at 7:25:34 PM UTC-3, Justin Fagnani wrote: > > app-localize just wraps format.js. You'd be bringing in a lot of Polymer > weight just for that. I'd try to use format.js directly or something > lit-html specific like > https://www.npmjs.com/package/@appnest/lit-translate > > On Thu, Feb 7, 2019 at 1:44 PM <[email protected] <javascript:>> wrote: > >> try this: >> >> >> // Import AppLocalizeBehavior >> import {AppLocalizeBehavior} from '@polymer/app-localize-behavior'; >> >> // Import a utility class to treat legacy behaviors as mixins >> import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class'; >> >> class Editor extends connect(store)(mixinBehaviors([AppLocalizeBehavior], >> LitElement)) { >> constructor() { >> super(); >> >> this.resources = { >> 'en': { 'cancel':'Cancel' }, >> 'es': { 'cancel':'Cancelar'} >> }; >> >> this.language = 'en'; >> } >> >> protected render() { >> return html` >> >> ${this.localize('close')} >> >> `; >> } >> >> >> >> On Monday, January 28, 2019 at 5:02:20 PM UTC-2, Juan Lorenzo Llanes >> wrote: >>> >>> could Anyone resolve this issue? >>> >>> On Sunday, July 22, 2018 at 11:58:42 AM UTC-3, [email protected] >>> wrote: >>>> >>>> Hi All, >>>> >>>> Have any way to attache a behaviour in (LitElement) >>>> lit-element, I want use : app-localize-behavior >>>> (https://www.polymer-project.org/3.0/toolbox/localize) to localize a >>>> lit-element. >>>> >>>> Any idea how to port it to use with lit-element.? like in >>>> mixinBehaviors([AppLocalizeBehavior], PolymerElement) ? >>>> Thanks >>>> >>>> >>>> Follow Polymer on Google+: plus.google.com/107187849809354688692 >> --- >> You received this message because you are subscribed to the Google Groups >> "Polymer" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/polymer-dev/abde19a1-9fce-4ac6-b24e-dcbc32f3a077%40googlegroups.com >> >> <https://groups.google.com/d/msgid/polymer-dev/abde19a1-9fce-4ac6-b24e-dcbc32f3a077%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > Follow Polymer on Google+: plus.google.com/107187849809354688692 --- You received this message because you are subscribed to the Google Groups "Polymer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/7c76593e-a65b-46a3-bb60-a9c29a1503d4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
