anon-8
November 15, 2018, 2:43am
1
This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal .
var PlumbingSubType = [
["Bathroom plumbing","Bathroom plumbing"],
["kitchen plumbing","kitchen plumbing"]
];
self.view.lstSubType.masterData = PlumbingSubType;
if i wont these data to have an Internationalization what should i do
anon-9
November 15, 2018, 5:26am
2
Hi @Al-hussein dimyati
You can define the the key and values in i18n file and then you can use the key define in i18n file as third parameter:-
var PlumbingSubType = [ ["Bathroom plumbing","Bathroom plumbing", "Key1"], ["kitchen plumbing","kitchen plumbing", "Key2"] ]; self.view.lstSubType.masterData = PlumbingSubType;
Hope this will help
Thanks
anon-9
November 15, 2018, 6:29am
3
Hi @Chloe Cvww
i have try the provided part of code and its not working !!!!
var ElectricitySubType = [
["AIRCON","Air conditioning",i18n.MST.AirConditioner]];
var ElectricitySubType = [
["AIRCON","Air conditioning","i18n.MST.AirConditioner"]];
var ElectricitySubType = [
["AIRCON","Air conditioning",kony.i18n.getLocalizedString("i18n.MST.AirConditioner")]];
self.view.lstSubType.masterData = ElectricitySubType;
anon-9
November 15, 2018, 7:57am
4
Hi @Al-hussein dimyati ,
Below is the working snippet to set Master Data with i18n keys for ListBox.
setDataList: function(){ var PlumbingSubType = [ ["AIRCON1",kony.i18n.getLocalizedString("key1")], ["AIRCON2",kony.i18n.getLocalizedString("key2")] ]; this.view.l1.masterData = PlumbingSubType; }
Attached screenshot for i18n list**Image removed for security reasons**
Regards,