NGX-Translate is an internationalization library for Angular 2+. It lets you define translations for your content in different languages and switch between them easily.
I'm developing an Ionic 2 mobile app and want to use ngx-translate features.
Following the tutorial, I'm importing necessary files in app module like this:
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
import {…
I need to use TranslateService.instant from ngx-core and pass parameters to do string interpolation.
So far I've done:
MY_STRING: "Welcome {{user}}"
In my component I do:
translateService.instant(MY_STRING, {user: 'Nick'})
and what I get from this…
I use angular-cli in my project with @ngx-translate. The application has lazy-loaded modules and one shared-module (not lazy-loaded) with components.
The language files are separated per modules. The problem is when I use a shared component in a…
In angular translation service, interpolating params in normal translation json works well. But in nested json, interpolating params is not working.
My JSON:
"SampleField": {
"SampleValidation": {
"MIN": "Value should not be less than…
I'm setting up a new Angular 7 app. I want to set a default text for translation. So in the translation {{ 'wait' | translate }}, I want to set text 'Waiting Now' as default text if there are any fallback. Means if data is being loaded or key is…
I want to make an angular 4 app that is multilangual.
I have followed the answer on Angular 2 - Multilingual Support
but it doesn't work.
I did every step, from 1 to 5 on that page and my appmodule looks the same.
I have a file en.json in a folder…
I'm having an issue with NGX-Translate in Angular7.
I'm trying to translate a phrase with a parameter. If the parameter is hardcoded, it works, but if the parameter is a variable it doesn't.
app.component.ts
import { Component, OnInit } from…
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": "Here's an example of text",
"INFORMATION": "Here's…
I use ngx-translate in my Angular application.
My HTML template:
{{ 'ADMIN.USER.ROLES.' + role | translate }}
My i18n json file:
"ADMIN": {
"USER": {
…
I've created my own private angular library with multiple components to make my life easier.
I made this library by following this tutorial.
Everything worked out great I even added it to another project to test it out.
Now comes the part where I…
hi it's been days since I've tried to solve this problem without success.
When I try to use the pipe translate i get this error
Error: Uncaught (in promise): Error: Template parse errors:
The pipe 'translate' could not be found ("
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 translate pipe in my views.
In two cases though, the…
We are using Angular 6 in our application. We recently started to prepare our app fro lazy-loading. Application has multiple lazy-loaded routes.
We want to use a single language file for all routes (don't need to separate it into chunks. But load…
I'm writing an angular app which uses @ngx-translate. With TranslateModule.forRoot(...) i provide a TranslateLoader:
@NgModule({
imports: [
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory:…
What we want to do
Use a separate translateLoader that loads it's own translations for a certain module in our app.
What we have tried
Al lot of different combinations of TranslateModule.forChild/TranslateModule.forRoot, with or without isolate:…