- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to create a Multilingual app let the user the choice between two languages. I thought that the user could make the choice with a form ( radio button) but i don't know how to save the selection for all the future use (phone reboot ecc). Could you help me? Is there some way to make a custom "config" file in which I can save the choice made by users?
Thanks a lot
Nicolò
- Tags:
- HTML5
- Intel® XDK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nicolò> you can use the cookie to store small data.
For example, to save data:
try { if(typeof(window.localStorage) !== 'undefined') { window.localStorage.setItem("linguaTela", wLinguaUso); } else { alert('Armazenamento local não definido (t6.1)'); } } catch(err){ alert('Dificuldade com o armazenamento local (t6.2): ' + err); }
and to recover data:
try { if(typeof(window.localStorage) !== 'undefined') { wLinguaUso = window.localStorage.getItem("linguaTela"); } else { alert('Armazenamento local não definido (a4.1)'); } } catch(err){ alert('Dificuldade com o armazenamento local (a4.2): ' + err); }
For translation I use jquery.localize.min.js.
You can see this app in action in https://play.google.com/store/apps/details?id=com.hamiltonhtsnet.com.br.faleparaowhatsapp2 or https://itunes.apple.com/us/app/fale-para-o-whatsapp/id992639466?l=pt&ls=1&mt=8
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nicolò> you can use the cookie to store small data.
For example, to save data:
try { if(typeof(window.localStorage) !== 'undefined') { window.localStorage.setItem("linguaTela", wLinguaUso); } else { alert('Armazenamento local não definido (t6.1)'); } } catch(err){ alert('Dificuldade com o armazenamento local (t6.2): ' + err); }
and to recover data:
try { if(typeof(window.localStorage) !== 'undefined') { wLinguaUso = window.localStorage.getItem("linguaTela"); } else { alert('Armazenamento local não definido (a4.1)'); } } catch(err){ alert('Dificuldade com o armazenamento local (a4.2): ' + err); }
For translation I use jquery.localize.min.js.
You can see this app in action in https://play.google.com/store/apps/details?id=com.hamiltonhtsnet.com.br.faleparaowhatsapp2 or https://itunes.apple.com/us/app/fale-para-o-whatsapp/id992639466?l=pt&ls=1&mt=8

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page