Permalink
Browse files

Return the ISO 639 locale code instead of the locale display name.

  • Loading branch information...
1 parent f2c65f6 commit 03f3119abb27d0a5a770dfc21875241e7075b630 @brycecurtis brycecurtis committed Aug 24, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 Android/Globalization/GlobalizationCommand.java
@@ -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);

0 comments on commit 03f3119

Please sign in to comment.