I found navigator.language sometimes only gave me the language and not the locale (eg "en" rather than "en-gb"). To solve this in android I created a new java class in src/com called DeviceCulture.java with this code:
package com;
import java.util.Locale;
public class DeviceCulture {
public String get() {
try{
return Locale.getDefault().toString();//get the locale from the Android Device
}catch(Exception e){
return "";
}
}
}
Then add this before the super.loadUrl line in /src/com/phonegap/YOUR_APP/App.java
DeviceCulture deviceCulture = new DeviceCulture();
appView.addJavascriptInterface(deviceCulture , "DeviceCulture");
Then in your javascript use this to get the locale (eg "en_GB")
window.DeviceCulture.get();