JioTranslate for Angular
The JioTranslate i18n SDK for Angular
Angular integration library of JioTranslate. With this package. It's super simple to add i18n to your Angular app!
npm install @jiotranslate/ngx-beta
Then use the library in your app.module.ts
. You have to add NgxJioTranslateModule
to your imports section and
add factory provider for JIOTRANSLATE_INSTANCE
token returning your JioTranslate instance.
...
import {
DevTools,
NgxJioTranslateModule,
JioTranslate,
JIOTRANSLATE_INSTANCE,
FormatSimple
} from '@jiotranslate/ngx-beta';
...
@NgModule({
declarations: [
...
],
imports: [
NgxJioTranslateModule,
...
],
providers: [
{
provide: JIOTRANSLATE_INSTANCE,
useFactory: () => {
return JioTranslate()
.use(DevTools())
.use(FormatSimple())
.init({
language: 'en'
// for development
apiUrl: environment.jiotranslateApiUrl,
apiKey: environment.jiotranslateApiKey,
// for production
staticData: {
...
}
});
},
},
],
bootstrap: [AppComponent],
})
export class AppModule {}
Translating using pipe:
<h1>{{"hello_world" | jiotms}}</h1>
Or using jio-tms attribute
<h1 jio-tms key="providing_default_values"></h1>
- An existing Angular project
- An API key obtained from JioTranslate Platform.
It saves you a significant amount of time on localization tasks. It also ensures your software is perfectly translated.
- Comprehensive localization solution tailored for your JavaScript application 🙌
- Seamless localization right from the start 🎉
- Translation management system 🎈