Page 1 of 1

How can I change the label values of a mobileselectmenu with javascript?

Posted: Wed Dec 06, 2017 9:47 pm
by Bernie

How can I change the label values of a mobileselectmenu with javascript?

Image


How can I change the label values of a mobileselectmenu with javascript?

Posted: Wed Dec 06, 2017 10:17 pm
by Bruce Stuart

Hi Bernie,

So you want to change just the label - and not the values ?? or both....

Bruce


How can I change the label values of a mobileselectmenu with javascript?

Posted: Thu Dec 07, 2017 4:54 pm
by Serhii Kulibaba

Hello Bernie,

Do you change these labels but it doesn't reflect the UI?
Could you please clarify have you changed anything on the Source tab?


How can I change the label values of a mobileselectmenu with javascript?

Posted: Thu Dec 07, 2017 6:50 pm
by Bernie

Hey guys,

I want to build an app that is bi-lingual.
Therefore I need to be able to witch the labels.
The value needs to be the same since that is what is going to be stored in the database.

Basically something like

if(localStorage.getItem("language")==="es"){

...change the labels to spanish

}


How can I change the label values of a mobileselectmenu with javascript?

Posted: Thu Dec 07, 2017 8:57 pm
by Serhii Kulibaba

The simplest way to add multilanguage support to the application is i18n plugin: https://docs.appery.io/docs/i18n
But it works for Ionic, not for JQM apps.

So we suggest you to create the Storage variable with pairs key/value (label/value) for each language and select the current one
After you saved the correct value to the Storage variable you can use that variable in the mapping to the Select component: https://docs.appery.io/docs/appbuilde...