Questions tagged [ng2-translate]
89 questions
4
votes
1 answer
ng2-translate - The pipe 'translate' could not be found
I am fixing my Karma configuration to run tests for Angular2 - rc 1 version.
I can run the tests but they fail if I have a translate pipe within the html.
(The config I could get it to work I got it from [here][1])
my karma.conf
module.exports…

ng-flo
- 293
- 4
- 17
3
votes
1 answer
ngx-translate special chars issue
In my angular 4 project I am using ngx-translate.
I have a problem with special chars like à, I see only a ?.
Do I need to use something particular to translate the special chars?
My project is in utf-8

Alessandro Celeghin
- 4,039
- 14
- 49
- 95
3
votes
2 answers
ng2-translate directive: why does renderer.setText not work?
i have written the following directive because apparently ng2-translate is missing one:
import { Directive, ElementRef, Renderer, OnDestroy } from '@angular/core';
import { TranslateService } from 'ng2-translate';
import { Subscription } from…

arturh
- 6,056
- 4
- 39
- 48
3
votes
2 answers
Angular 2 RC6: cli-compiler says "function calls are not supported"
When trying to compile my RC6 app using the following command:
ngc -p C:\Path\To\Project
(I am placed inside C:\Path\To\Project\node_modules\.bin when I'm running the command)
I get the following error:
Error encountered resolving symbol values…

Glenn Utter
- 2,313
- 7
- 32
- 44
3
votes
2 answers
IE specific: Translate Pipe not working in Angular 2 RC4
I am trying to use ng2-translate to show userName in different languages.
My LoginComponent looks like the one below:
import { Component } from '@angular/core';
import {TranslateService, TranslatePipe} from…

Debopam Chanda
- 161
- 1
- 7
2
votes
3 answers
Unable to Translate Keys using Ng2-Translate in Http Interceptors and Home Component Angular 2 , Angular 6
My Code is like below, I am using 3rd party login (openAM) for my application. when ever I got 401, I should redirect the application to another URL from there user will be logged in.
I user http interceptors to check the status and redirect to…

Abhi
- 255
- 3
- 20
2
votes
1 answer
I Got error Like this in Angular
In my angular 2 project i used SEO when i include ng2 timeout plugin and run the Project using 'npm start' i got this error
ts-node src/server.ts
(function (exports, require, module, __filename, __dirname) { export { ShTimeoutModule } from…

Aravinthan M
- 835
- 1
- 9
- 24
2
votes
0 answers
i18n angular 2 translation from variables from backend
Im currently using i18n on my angular 2 .
In the DOM i can easily use the i18n attribute to translate whatever i want.
But i also have text-strings comming from the backend thats is mainly written in english (node.js).How would i go forward to…

maria
- 207
- 5
- 22
- 56
2
votes
1 answer
ng2-translate customLoader & multiple files per language
In an Ionic2 app I'm using ng2-translate the strings in my app.
Now I need to split the translation file into several files per language, for example de.json and de_gs1ais.json. As ng2-translate is limited to one file per language I've tried to…

kofler harald
- 43
- 6
2
votes
1 answer
ng2-translate use localstorage
I need to use localstorage to store the selected language in my Angular2 application with ng2-translate.
I found this class which is supposed to store the selected language in localstorage:
import {TranslateLoader} from…

Elbbard
- 2,064
- 6
- 30
- 53
2
votes
1 answer
How to trap errors from chained rxjs observables when using combineLatest?
Following on from this post, I have the following
Observable.combineLatest(
this.translate.get("key1"),
this.translate.get(""),
this.translate.get("key3"),
this.translate.get("key4")
)
.subscribe(([result1,…

peterc
- 6,921
- 9
- 65
- 131
2
votes
2 answers
How to chain calls to ng2-Translate, and rxjs observables in general?
I have just started using the ng2 translate in my Ionic 2 (Angular 2) project. I Have found that when I need to get a few strings all at once, the code becomes nested and a lot harder to read. I am sort of wondering why something like this (that…

peterc
- 6,921
- 9
- 65
- 131
2
votes
1 answer
Import ng2Translate into all modules without having to use a SharedModule
The instructions for the ng2-translate module mention easily adding Translate to a SharedModule that you import into your other modules, if you're working in a modular project and you want it to be available in all modules.
This actually isn't so…

A. Duff
- 4,097
- 7
- 38
- 69
2
votes
0 answers
Update translateParams in ng2-translate directive
Given a translation string such as:
"TIMEOUT": "Timeout in {{value}} seconds."
Is it possible to bind value in such a way that it will trigger ng2-translate to update the translated string when the underlying parameter changes?
import { Component }…

ken.dunnington
- 905
- 1
- 7
- 20
2
votes
0 answers
Angular 2 Keep ng2-translate DRY when using multiple modules
I am new working with Angular 2 and have a question regarding keeping the code DRY when using multiple modules.
I have a shared module where i import and export common used functionality for other modules.
One of those imports are…
user1973285