Locale split
This commit is contained in:
parent
e50278a35e
commit
621d3fa040
@ -52,10 +52,10 @@ public class PlatformUtil extends ChannelDelegateImpl {
|
|||||||
if (locale == null) {
|
if (locale == null) {
|
||||||
return Locale.US;
|
return Locale.US;
|
||||||
}
|
}
|
||||||
String[] localeSplitted = locale.split("_");
|
String[] localeSplit = locale.split("_");
|
||||||
String language = localeSplitted[0];
|
String language = localeSplit[0];
|
||||||
String country = localeSplitted.length > 1 ? localeSplitted[1] : "";
|
String country = localeSplit.length > 1 ? localeSplit[1] : "";
|
||||||
String variant = localeSplitted.length > 2 ? localeSplitted[2] : "";
|
String variant = localeSplit.length > 2 ? localeSplit[2] : "";
|
||||||
return new Locale(language, country, variant);
|
return new Locale(language, country, variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user