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

rbaumi picture rbaumi  路  4Comments

jstoup111 picture jstoup111  路  4Comments

guysan picture guysan  路  4Comments

dankerk picture dankerk  路  3Comments

briancullinan picture briancullinan  路  3Comments