I have been trying to unravel the various documentation examples for using the globalization plugin of PhoneGapBuild (3.0).
In my config.xml I have :
<gap:plugin name="org.apache.cordova.globalization" />
at the top of my index.html i have:
<script src="phonegap.js"></script>
<script src="globalization.js"></script>
and at the bottom I have:
<script>
document.addEventListener("deviceready", function (e) {
navigator.globalization.getPreferredLanguage(
function (language) { alert('language: ' + language.value + '\n'); },
function (error) { alert(error); }
);
}, "false");
</script>
when I upload the app to phonegap build and run it on a new HTC One, the failure callback fires and alerts:
"class not found"
I feel there is something fundamental I am missing, but am at a loss
Also, when I look at the "plugins" tab of the phonegap build project page, globalization is listed.
Please help!
I'm not absolutely sure, but maybe this directive is required in your config.xml
Try to look the docs