Questions tagged [angular-i18n]

angular-i18n is part of the Angular framework, which provides i18n features like localization (dates, number, percentages, and currencies), text translations, pluralization and alternative text. For the older AngularJS (1.x) web framework, use the angular-translate tag.

Angular 2+ provides its own tool for internationalization. It already supports many features, but misses some major features like lazy loading, translation outside templates etc. Those features will be available in Angular 6+.

Angular i18n Documentation

Since Angular is under development the implementation of i18n still is in progress an can be tracked on this GitHub issue: #16477

263 questions
5
votes
1 answer

angular-i18n select syntax in attribute

I was trying to use the i18n SELECT syntax to translate a placeholder for an input field: this results to the…
dobecker
  • 161
  • 1
  • 8
4
votes
4 answers

is runtime language translation possible with angular (@angular/localize)?

I am trying to learn and add angular internationalization in a project. I can understand only compile time translation from angular documents (https://angular.io/guide/i18n-overview). I need some thing like this…
4
votes
1 answer

How to use anguluar i18n in html template with variables?

Is it possible to use variables in an angular template i18n string? In TypeScript I can use template string, eg: public welcomeMessage = $localize`:@@test.welcome: Hello ${this.name}:user_name:! How's your day?`; Can I use something similar in html…
nclskfm
  • 154
  • 1
  • 10
4
votes
1 answer

Angular i18 localize value of interpolated string in template

Let's say I have to translations in my angular app xliff @@field-is-required which has a string interpolation and @@lastname which is a normal translation.
Staeff
  • 4,994
  • 6
  • 34
  • 58
4
votes
1 answer

Does Angular i18n support Devanagari digits?

I'm working on i18n in Angular 8 app. I have registered locale Hindi ('hi') using following code inside app.module.ts. import { registerLocaleData } from '@angular/common'; import localeHi from '@angular/common/locales/hi'; import localeHiExtra from…
Gourav Pokharkar
  • 1,568
  • 1
  • 11
  • 33
4
votes
3 answers

Migration to the angular v9. i18n breaking changes

I'm migrating an Angular project from 8.2.14 to the 9.0.0-rc.14. Using i18n for localization. I followed the guide here https://update.angular.io/#8.2:9.0 and it feels it went fine. After the upgrade, I'm trying to run the project, but ng serve…
qiAlex
  • 4,290
  • 2
  • 19
  • 35
4
votes
1 answer

On refresh of browser for angular application, i18n folder problem

I am running the application through npm run watch which starts node server in a seperate port and angular application in different port. The assets folder is also there which contains i18n folder for language implementation and is inside src…
4
votes
1 answer

How to deploy Angular multilanguage application on Google App Engine

I've built my Angular 8 application, with angular/cli and i18n multilanguage support (with translations for English, Spanish, French). So that I can build my app multiple times, one for each language and the build is saved in dist/my-app/en,…
4
votes
1 answer

How to translate text, that is hidden with ngif, on the initialization of the page?

I'm setting up i18n translation to implement multiple languages for my web application. In my web application I'm using Angular Material Steppers which have steps that are hidden until certain actions are completed. The steps are hidden with the…
4
votes
0 answers

Angular, i18n, adding translations - workflow

I read this from the Angular documentation: https://angular.io/guide/i18n and something isn't clear to me: Once translations are added to an app and the source files are created with "ng xi18n" it will happen that the app code is modified after…
Fabianus
  • 633
  • 7
  • 16
4
votes
2 answers

Angular i18n for text containing routerLink and requires different word order

I am struggling to find the most efficient way to translate the text containing routerLink or text where some words should be wrapped in html tags ( word ). Let's see how it looks without the i18n implementation: example.component.html
Hello…
Dino
  • 7,779
  • 12
  • 46
  • 85
4
votes
1 answer

How to pass i18n key from parent to child component before translation starts?

I'am using an input-field component which I can embed in different parent components using forms. In the input child component, I have an i18n translation key as variable using interpolation, which I would like to generate dynamically from parent…
4
votes
1 answer

Angular i18n - Interpolation

I am following the Angular i18n guide: https://angular.io/guide/i18n I got how to interpolate correctly a "String + Variable". Persons:
Andrés Oviedo
  • 1,388
  • 1
  • 13
  • 28
4
votes
1 answer

Angular 6 Mixing i18n JIT and AOT

It seems that development uses JIT and prod uses AOT, which is fine. However I'm trying to read the LOCALE_ID which seems to be null using JIT: @Inject(LOCALE_ID) public localeId: string; Comes out null. I suspect I need to specify the language in…
Dory Zidon
  • 10,497
  • 2
  • 25
  • 39
4
votes
3 answers

Angular 2 routes - redirect to different app

I'm generating various versions of my app in alternate languages. I'm using AOT (ahead of time) compilations, so I end up with static deployable sites in a structure that looks like this: dist - index.html -- entry file for the default (English…
Chris Halcrow
  • 28,994
  • 18
  • 176
  • 206