ListBox MasterData Internationalization (i18n)

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

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:-

  1. var PlumbingSubType = [
  2. ["Bathroom plumbing","Bathroom plumbing", "Key1"],
  3. ["kitchen plumbing","kitchen plumbing", "Key2"]
  4. ];
  5. self.view.lstSubType.masterData = PlumbingSubType;

Hope this will help

Thanks

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;

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,