angularjs - Angular Translate doesn't work with multiple translation IDs -
this doesn't work. returns blank.
$translate('invest_edu', 'most_ultimate').then(function (investedu, mostultimate) {
then tried this, object:
$translate('invest_edu', 'most_ultimate').then(function (translations) {
accessing `translations.invest_edu'. first 1 appears, second 1 blank.
what doing wrong here, in making angular-translate work multiple translation ids.
angular translate usage:
$translate(translationid[, interpolateparams], interpolationid);
translationid [string | array] - token represents translation id can optionally array of translation ids results function returns object each key translation id , value translation.
interpolateparams(optional) [object]-an object hash dynamic values
interpolationid [string] - id of interpolation use
http://angular-translate.github.io/docs/#/api/pascalprecht.translate.$translate
this means, if want multiple translation ids call soemthing $translate(['invest_edu','most_ultimate']).then(function(results){...}
Comments
Post a Comment