Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Commit

Permalink
Return the ISO 639 locale code instead of the locale display name.
Browse files Browse the repository at this point in the history
  • Loading branch information
brycecurtis committed Aug 24, 2011
1 parent f2c65f6 commit 03f3119
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Android/Globalization/GlobalizationCommand.java
Expand Up @@ -84,10 +84,8 @@ public PluginResult execute(String action, JSONArray data, String callbackId) {
*/
private JSONObject getLocaleName() throws GlobalizationError{
JSONObject obj = new JSONObject();
String value = null;
try{
value = Locale.getDefault().getDisplayName(); //get the locale from the Android Device
obj.put("value",value);
obj.put("value",Locale.getDefault().toString());//get the locale from the Android Device
return obj;
}catch(Exception e){
throw new GlobalizationError(GlobalizationError.UNKNOWN_ERROR);
Expand Down

0 comments on commit 03f3119

Please sign in to comment.