Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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.