Questions tagged [ng2-translate]

89 questions
0
votes
1 answer

Fallback translations culture > language > default

I'm developing an Ionic2 app (Typescript) and just adding i18n. I'm developing in my native language (en) - and looking to support cultural variants of languages (e.g. fr vs fr-CA vs vs fr-BE...). These variants will be developed and added over…
GrantDG
  • 401
  • 1
  • 7
  • 14
0
votes
2 answers

ionic2 with ng2-translate throws compilation error

I am building an Ionic2 app and trying to use ng2-translate for localization. I followed https://ionicframework.com/docs/v2/resources/ng2-translate/ this tutorial. However it gives me some compilation errors as follows: because of these app can…
Thinker
  • 5,326
  • 13
  • 61
  • 137
0
votes
2 answers

Angular ng2-translate doesn't work in a child component of root component

I have decided to use ng2-translate library for application internationalization as it seems better that default implementation. But I have faced the following problems. Here is my code: app.module.ts: import { TranslateModule } from…
Cosmin D
  • 639
  • 1
  • 11
  • 24
0
votes
1 answer

Make simple ng2-translate translation work in HTML template

I just added ng2-translate (5.0.0) to our angular (2.4.1) + typescript (2.0.3) + webpack (2.1.0-beta.25) project. I'm defining translations manually through setTranslation and some dictionaries in memory, early on at construction time. When I use…
superjos
  • 12,189
  • 6
  • 89
  • 134
0
votes
2 answers

ng2-translate directive not working while pipe is

Ng2-translate directive is causing me some issues, but I don't get if I'm doing something wrong or if it's a bug. On the same component's html template, the translate pipe is working, while the translate directive is not. In particular:
don
  • 4,113
  • 13
  • 45
  • 70
0
votes
2 answers

ionic2 ng2-translate not working in modal

I have problems using ng2-translate in combination with modals in ionic2. Translations in normal pages are working. This is my app.module.ts file: import ... @NgModule({ declarations: [ MyApp, //... ], imports: [ …
0
votes
2 answers

ng2-translate on component file

im using ng2-translate on my ionic2 app and i have it working nicely on static text on html like: {{ 'Inventory.view-header' | translate }} I get this title translated but when i try to translate this:
Fernando Del Olmo
  • 1,440
  • 17
  • 32
0
votes
1 answer

Ionic 2 : Use ng2-translate in a ts file

I want to use a translation in an object to use the toast on Ionic 2. But I don't understand how to use ng2-translate in a .ts file... Somenone can show me an example ? I want to have a translation in a title in my menu. I try like this but it…
V. Pivet
  • 1,320
  • 3
  • 25
  • 57
0
votes
1 answer

http://localhost:9876/assets/i18n/en.json 404 ng2-translate

I am trying to run a simple unit test on angular2 app generated with angular-cli@1.0.0-beta.14 which uses ng2-translate@2.5.0. When I run my unit tests the translate service can not load the translation file. I believe the solution lies in a…
0
votes
0 answers

Translating Highcharts using ng2-translate

I'm trying to translate Highcharts' name series using ng2-translate with Angular 2 RC.6. I have the chart configuration in my constructor, where I call a function to translate the series name: constructor(private translate: TranslateService) { …
brians69
  • 485
  • 2
  • 11
  • 24
0
votes
1 answer

Lost in translation: Angular2, ng2-translate, database values

I have a list of countries coming from the database, to be shown in a dropdown for when users enter their address. Using ng2-translate, is there a way to translate them? I'd like to be able to do something like the following:
Seb
  • 778
  • 1
  • 9
  • 27
0
votes
3 answers

Angular 2 Translation Library?

Is there any other alternate library for Angular 2 Translation other than ng2-translate ?
0
votes
1 answer

JSON key displayed instead of translating strings

For some reason, the code below does not translate my strings, ie it displays my json KEY (ex: MY_NEW_SITES). Hope you will see something wrong on what I am doing Here is the code main.ts // this import should be first in order to load some…
David
  • 1,241
  • 20
  • 36
-1
votes
2 answers

How to use Ng2-translate into *NgFor

i need to translate the Data that i get in NgFor but i couldn't find any solution for it. can any 1 find solution for this
1 2 3 4 5
6