Installation
To get full image of working Angular integration check our Angular example application. To install Tolgee Angular integration library run:
- npm
- yarn
npm install @tolgee/ngx
yarn add @tolgee/ngx
To install UI bundle for in-context translating you will also need to install package @tolgee/ui
.
- npm
- yarn
npm install @tolgee/ui
yarn add @tolgee/ui
Then import NgxTolgeeModule
in your module file app.module.ts
:
import {NgModule} from '@angular/core';
import { environment } from '../environments/environment';
@NgModule({
declarations: [
...
],
imports: [
...,
NgxTolgeeModule.forRoot({
apiUrl: environment.tolgeeApiUrl,
apiKey: environment.tolgeeApiKey,
ui: environment.tolgeeApiKey ? require("@tolgee/ui") : undefined
}),
...,
],
...,
})
export class AppModule {
}
You can provide API key and API url directly, or you can use angular application environments.
That's it. Now you can use Tolgee for translating your strings.
Other configuration properties
Configuration properties for all web integrations are similar. They are described in configuration section.