ngx-translate Questions

4

Solved

I'm using @ngx-translate for language handling in an Angular 5 app I'm creating. The app has two feature modules, one lazy loaded and one eager loaded. The problem is that the translate pipe work...
Intermediary asked 24/1, 2018 at 8:47

6

I have a problem with injecting dependencies into the interceptor. I want to inject TranslateService into HttpErrorInterceptor, but I get a cyclic dependency error. When I remove the TranslateServi...
Ray asked 18/4, 2021 at 18:51

7

Solved

I am trying to make a method which would accept string key and return translated string value by using translate.instant(parameter). The problem is that it returns key(parameter). Usually this is r...
Ileenileitis asked 14/9, 2017 at 10:4

2

Solved

I use standalone components in Angular 17. When I used module architecture, I didn't have this problem. I added it to import in AppModule and it works good. imports: [ TranslateModule.forRoot(load...

2

Solved

I've downloaded the package ngx-translate/core, and been following the documentation instructions. I can't get the translation to work. The steps i made: 1] define everything in the AppModule im...
Thumbscrew asked 22/8, 2017 at 18:47

6

My question is about ngx translate in angular2. My project supports 2 languages: English and Arabic and hence there is en.json and ar.json files. The below code will give me translated value of key...
Hershel asked 18/10, 2017 at 18:15

5

I would like to make a part of my text bold. I get a text from a specific file. "INFORMATION": "Here's an example of text", I would want that Here's an to be bold. "INFORMATION": "<b>Her...
Alcaide asked 19/3, 2019 at 13:0

3

I want to get current language with this.translate.getBrowserLang(), but it always return 'en', whatever the current language is and what the supported languages is. Here is the plnkr: https://pln...
Titanite asked 9/3, 2017 at 15:37

6

I want to implement ngx-translate in angular 5 project lazy loaded module wise its working for only parent module but not works in my child module so please suggest better solution. I write my cod...
Saintsimon asked 12/7, 2018 at 10:2

6

Solved

I am trying to deploy an Angular 7 app that uses ngx-translate and translated language files in the /dist/assets folder. I specified the correct base href in build. After deployment, I see everythi...
Chinook asked 21/5, 2019 at 16:42

11

I am trying to build an application with Angular 6 and I am still setting everything up. But it seems there is something wrong with the dependency injection in my app. It cannot resolve any const...

4

Solved

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 t...

1

We are converting Angular 1.x to angular In version 1 we have been using yaml files for localization In angular latest verison we have a plugin called ngx-translate for this multi lingual localiza...
Ardoin asked 25/3, 2019 at 10:32

5

Solved

There are multiple methode to translate an (Angular) app, the big main methodes are : ngx-translate and Angular 2 native i18n As far I understood i18n is easier for SEO because of the clean url bro...
Pewter asked 5/7, 2017 at 10:7

2

Solved

I'm trying to get translations work for both the app components and the lib components. For now I can only get app or lib components to work, but not at the same time. Structure: Created an ioni...
Switch asked 6/5, 2020 at 13:25

2

I'm writing an angular app which uses @ngx-translate. With TranslateModule.forRoot(...) i provide a TranslateLoader: @NgModule({ imports: [ TranslateModule.forRoot({ loader: { provide: Transla...
Vassal asked 5/3, 2018 at 15:42

3

I'm using ngx-translate with no-problems in views, using pipes. What i need to do is to use it in a component, for example to show an error message, or define a datatable column default content. I...
Sky asked 25/7, 2017 at 22:38

3

Solved

I have a angular library where I created a LanguageModule defined as follows @NgModule({ imports: [ TranslateModule.forRoot({ loader: { provide: TranslateLoader, useFactory: (createTranslateLo...
Angola asked 6/7, 2021 at 9:4

2

Solved

I use ng2-translate in my Angular 5 project and I am trying to create a unit test for one component. I always import TranslateModule.forRoot( *...* ) in my Tests and the tests will work using the t...

9

Solved

I'm using this @ngx-translate/core i18n service and it works fine in templates (.html) with this syntax: {{'my.i18n.key'|translate}} Now I want to translate something in my component typescript ...
Clipping asked 24/8, 2017 at 20:40

1

I have installed @ngx-translate/core Version 14.0.0 and @ngx-translate/http-loader Version ^7.0.0 in my Application and followed a few tutorials (eg. this) on how to add Multiple Languages to an An...
Forint asked 14/2, 2022 at 13:18

3

I have application with many modules. I am using ngx-translate for multilingual functionality. But, it's not working. i18n.module.ts import { NgModule } from "@angular/core"; import { BrowserModu...

1

Is there a way to translate css selectors(::after, ::before) content using ngx-translate ? .custom-file-label::after { content: "Browse" }

3

Solved

I'm loading the translation files from the server using TranslateHttpLoader in my app.module.ts like this: export function createTranslateLoader(http: Http) { return new TranslateHttpLoader(http,...
Ventage asked 24/7, 2017 at 12:40

1

is there any way to create an angular library with handling the translation inside the library with ngx-translate ? i've been trying a lot of methods for the last couple of days with no luck
Radtke asked 21/8, 2021 at 22:55

© 2022 - 2024 — McMap. All rights reserved.