简体   繁体   中英

angular-translate - multiple languages on the same page

I'm building a questionnaire type app where you have the first person language on top and you have the exact same question on the bottom in a different language.

right now i'm data binding all question to one big object like this. lanOneQuestion lanTwoQuestion and each question has like lanOneQuestion.one that corresponds to the each question. I get the string of data from a big json document.

I'm wondering if I could use angular-translate, but I didn't see a way to use multiple language's at the same time?

You can use this code

translatedWord = $translate.instant(YOUR_KEY,{},"",YOUR_LANGUAGE);

You can check this

https://github.com/angular-translate/angular-translate/pull/1328

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM