Skip to content

JioMeet/JioLocalizationSDK_ANGULAR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

JioTranslate for Angular
The JioTranslate i18n SDK for Angular

What's JioTranslate for Angular?

Angular integration library of JioTranslate. With this package. It's super simple to add i18n to your Angular app!

Installation

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 {}

Usage

Translating using pipe:

<h1>{{"hello_world" | jiotms}}</h1>

Or using jio-tms attribute

<h1 jio-tms key="providing_default_values"></h1>

Prerequisites

  1. An existing Angular project
  2. An API key obtained from JioTranslate Platform.

Why use JioTranslate?

It saves you a significant amount of time on localization tasks. It also ensures your software is perfectly translated.

Features

  • Comprehensive localization solution tailored for your JavaScript application 🙌
  • Seamless localization right from the start 🎉
  • Translation management system 🎈

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published