Core: Loading translation from variable

Created on 23 Sep 2016  路  4Comments  路  Source: ngx-translate/core

Hi everybody.
Could someone help me please

Is it possible to load json object with translation from variable, not from file.json?

questiosupport

Most helpful comment

yes, you can use setTranslation:

translate.setTranslation('en', {
    "HELLO": "hello {{value}}"
});

All 4 comments

yes, you can use setTranslation:

translate.setTranslation('en', {
    "HELLO": "hello {{value}}"
});

Thank you, Olivier!

Hi,
I have one problem, I load some translates from .json file throught TranslateStaticLoader.
But I can use setTranslation for some content too, but setTranslation dont work for me..

I use ionic2-rc-2

Is this bug or? :)
Thanks.

Hello @ocombe... Is there any performance cons if we use the method 'setTranslation' instead of the normal load ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryanki1 picture ryanki1  路  4Comments

alkemist picture alkemist  路  3Comments

crebuh picture crebuh  路  3Comments

madoublet picture madoublet  路  3Comments

briancullinan picture briancullinan  路  3Comments