Angular Translation Library
ngx-translate
Language state and runtime translations for Angular apps with signals, SSR safety, and standalone-first bootstrap APIs.
Use one focused package for language selection, translation loading, template pipes, and directive-based runtime text replacement.
landing.ts
Project Overview
Package
ngx-translate
Focused Angular i18n building blocks with guarded browser APIs so SSR stays intact.
License
MIT
Published as a public package and designed for reuse across multiple apps.
Installation
Install the package
$ npm i --save ngx-translateUsage
Bootstrap with provideTranslate()
import { provideTranslate } from 'ngx-translate';
export const appConfig = {
providers: [provideTranslate({ defaultLanguage: 'en' })],
};Configuration
Configure language and file loading
Configure supported languages, default language, translation payloads, and persistence once instead of repeating runtime i18n setup across components.
import { provideTranslate } from 'ngx-translate';
export const appConfig = {
providers: [
provideTranslate({
defaultLanguage: 'en',
languages: ['en', 'de', 'fr'],
folder: '/i18n/',
persistLanguage: true,
}),
],
};Features
What ngx-translate includes
Bootstrap and setup
Standalone-first language and translation setup for Angular applications.
provideLanguage() for language-only bootstrap | provideTranslate() for runtime i18n bootstrap | inline translations or /i18n/{lang}.json file loading
Runtime services
Focused APIs for language state, translation lookup, and live UI updates.
LanguageService for current/default language state | TranslateService for signal-based runtime translations | language persistence with SSR-safe local storage guards
Template integration
Use the same translation runtime in templates, directives, and app shell controls.
TranslatePipe and TranslateDirective | language switchers and translated headers | lazy signals that fall back to source text
Reference
Documented feature pages
The detailed pages below cover the full public API surface of the package.
