Solution i18n Angular
Composants standalone, signals et support SSR pour les applications Angular.
Get started in 3 steps
Install
Add the Better i18n Angular package to your project.
npm install @better-i18n/angular
Import the module
Import BetterI18nModule in your AppModule or standalone component.
import { BetterI18nModule } from '@better-i18n/angular';
@NgModule({
imports: [
BetterI18nModule.forRoot({
project: 'your-org/your-project',
defaultLocale: 'en',
}),
],
})
export class AppModule {}Use the translate pipe
Use the translate pipe or directive in your templates to display translations.
<h1>{{ 'welcome' | translate }}</h1>
<p>{{ 'greeting' | translate: { name: userName } }}</p>Fonctionnalités
Démarrage rapide
Ajoutez l’i18n à votre app Angular avec des pipes et des services.
// app.component.ts
import { Component } from '@angular/core';
import { TranslateService } from '@better-i18n/angular';
@Component({
selector: 'app-root',
template: `
<h1>{{ 'welcome' | translate }}</h1>
<p>{{ 'greeting' | translate: { name: 'World' } }}</p>
`
})
export class AppComponent {
constructor(private translate: TranslateService) {
translate.setDefaultLang('en');
}
}Compatible avec les bibliothèques i18n populaires d'Angular
Better i18n complète votre bibliothèque i18n Angular — gérez les traductions visuellement, collaborez avec les traducteurs et déployez via CDN.
Better i18n + @ngx-translate/core
La bibliothèque de traduction Angular la plus utilisée. Traductions à l'exécution avec pipes, directives et injection de service.
Better i18n exporte au format JSON ngx-translate. Modifiez les traductions dans notre tableau de bord, synchronisez automatiquement avec votre dépôt.
Better i18n + Angular i18n (built-in)
Le système i18n officiel d'Angular avec compilation AOT, expressions ICU et extraction des traductions à la compilation.
Export au format Angular XLIFF. Better i18n gère le workflow de traduction, Angular CLI construit les bundles spécifiques à chaque locale.
Better i18n + Transloco
Bibliothèque i18n moderne et légère pour Angular avec chargement différé, plugins riches et excellent support TypeScript.
Synchronisez les traductions au format JSON Transloco via l'intégration GitHub de Better i18n. Mises à jour en temps réel avec livraison CDN.
Découvrez d'autres guides sur les frameworks
Better i18n vs les alternatives
Offre gratuite disponible. Aucune carte bancaire requise.