EddyVerbruggen / nativescript-localize

Internationalization plugin for NativeScript using native capabilities of each platform
MIT License
79 stars 31 forks source link

Use in Angular 2 component #4

Closed dvdbrk closed 7 years ago

dvdbrk commented 7 years ago

Any ides how to use this in the component, i.e:

this.message = "Hello world"

Or any similar workaround? For example if that message is shown in the template as:

(tap)="alert(this.message)"

lfabreges commented 7 years ago

You can use it directly like this:

import { localize } from "nativescript-localize";
this.message = localize("Hello world");