angularjs - Multilingual top level tab in Ionic based App -
i want multilingual set of tabs, ones defined in:
// setup abstract state tabs directive .state('tab', { url: "/tab", abstract: true, templateurl: "templates/en/tabs.html" })
this i've tried, far:
<ion-tab title="{{trans.marketplace}}" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear" href="#/tab/market"> <ion-nav-view name="tab-market"></ion-nav-view> </ion-tab>
i've tried ng-model
well, incidentally.
and [toy working, have debug alerts in it!] languages factory:
var en = { 'marketplace' : 'marketplace', }; var fr = { 'marketplace' : 'marche', }; if (lang == 'en') { trans = en ; } else if (lang == 'fr') { trans = fr ; } var stuff = json.stringify(trans) ; alert('in translate ' + stuff + ' ' + lang) ; return trans ;
the languages do load, permanent storage before main display. 'something this' should work? i'm aware deliver language strings in other way, seems pretty simple. wanted /template/language-code/stuff.html
web application doesn't seem way of app.
thanks in advance hugh
Comments
Post a Comment