Hi, how can I get language from the ios device? The phonegap documentation says it can be done with following javascript:
navigator.globalization.getPreferredLanguage( function (language) {alert('language: ' + language.value + '\n');}, function () {alert('Error getting language\n');} );[/code:3uneeg4d] Although I don't know how can I execute it from within the Construct. Is there a way?
Develop games in your browser. Powerful, performant & highly capable.
Well, one possible way to get language is use browser.language variable?
Is there a way to get only first two letters from the variable? (like substring method)
browser language returns en-US or en-UK and I think one "en" version will be fine.