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
0
votes
1 answer

I want to delete the error "GET http: // localhost: 4200 / assets / i18n / 1 / fr.json 404 (Not Found)" in the console @ Angular

I want to avoid the error "GET http: // localhost: 4200 / assets / i18n / 1 / fr.json 404 (Not Found)" in the console and in the network of navigator in Angular //custom.translate.loader.ts****** return Observable.create(observer => { …
wiem khardani
  • 53
  • 1
  • 11
0
votes
0 answers

Routes messed after implementing Angular Internationalization (i18n)

After a lot of research, I finally decided to use Angular Internationalization (i18n). Current routes (as you can see they are independent of the language): const routes: Routes = [ { path: '', canActivate: [AuthGuardService], …
0
votes
1 answer

Global $localize method in Angular 9 returns the text itself

I've been following the tutorials on how to use $localize, and have been trying to use it as follows: My angular.json (related parts): "build": { ... "configurations": { ... "fr-FR": { …
Hasan Can Saral
  • 2,950
  • 5
  • 43
  • 78
0
votes
1 answer

trying to inherit/extend the ngx-translate pipe function but returning empty string

exactly what it says in the title. I'm trying to inherit from the translatePipe but it results in an empty string. When I use the regular translatePipe everything works fine but when I change it to my custom dynamicTranslatePipe it's an empty…
0
votes
1 answer

How to use API response messages in Angular 8 i18n?

I am in need to use translations for API responses (especially error messages) Ex: 1) User name invalid for test@test.com 2) Password is incorrect for test@test.com 3) Login Success for test@test.com I used i18n select for this purpose. My sample…
prisel
  • 337
  • 2
  • 14
0
votes
1 answer

Angular elements and Internationalization (i18n)

I am working in a project that has Angular elements(or Angular web components) and I need do the Internationalization (i18n) in Spanish language following the Angular rules. my angular.json is: { "$schema":…
beanic
  • 539
  • 6
  • 22
0
votes
0 answers

Angular translation : how to translate datatable search and pagination

I'm using datatable of jquery to show some data, I'm using angular translation @ngx-translate/core": "^11.0.1", to internationalize my app and I'm search for a way to translate datatable search and pagination area !
0
votes
2 answers

Cannot find ngx-translate files

I'm trying to implement ngx-translate from this tutorial: Locally when I run the angular app using npm start it's working fine. But when I want to use custom subdir like this: ng build --output-path angular --base-href=/angular/ and to deploy it on…
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
0
votes
1 answer

NGINX i18n without changing URL

I wonder how to redirect traffic based on browser language using NGINX without changing the URL. Here is my file structure: en |- index.html fr |- index.html I followed this tutorial, which is working as expected e.g. /home is redirected to…
Maxime Gélinas
  • 2,202
  • 2
  • 18
  • 35
0
votes
2 answers

How use XMB translate files on Angular 9?

I know how to do the translation with Angular XLF files, but it can be configured so that the translation files have the extension XMB. The steps I took were: 1) Put the i18n tags in the html 2) ng xi18n --output-path src/locale --format=xmb 3) Copy…
juanjinario
  • 596
  • 1
  • 9
  • 24
0
votes
2 answers

Angular 8: Universal and i18n - not able to serve app locally

I have added Angular Universal to an existing project with i18n. I can build it but I am not able to serve it. At the moment I get this error: Cannot find module '/home/my-user/my-app/dist/da/server' The structure of the files in "dist" folder…
Jette
  • 2,459
  • 28
  • 37
0
votes
1 answer

Angular: translate function not reachable from other component

in my Angular App I have a main component A and a sub component B loaded by lazy loading. In this sub component B I have the following functions: translator(){ this.translate.use('de'); } checkText(){ console.log('check text…
Archimede
  • 699
  • 3
  • 15
  • 28
0
votes
0 answers

Accessing angular i18n bundles programmatically

I need help on building and deploying angular app with builtin i18n. I am able to build for multiple languages. My dist folder structure is like this dist /app/es the app folder contains default language bundle(en). I am able to switch to different…
Arul Rozario
  • 679
  • 1
  • 9
  • 20
0
votes
2 answers

File localization/translation in angular 7 where i18n cannot be used

I have an Angular 7 application that has already been built. Now we are planning to support it in to multiple languages. The issue is with success/failure messages we are showing on page depending on api calls. For this we are using one global file…
Taani
  • 43
  • 1
  • 10
0
votes
2 answers

Angular i18n with two different links

I have an angular app with implemented i18n for choosing language depends on customer will. Now I want to set up a footer with a link which will be redirected to a differing site depends on language…
witosh
  • 79
  • 3