the real moins moins | en effet, mais :
[extrait du source de java.util.Locale, de la jdk sun 1.4.2_05 linux]
Code :
- public static Locale getDefault() {
- // do not synchronize this method - see 4071298
- // it's OK if more than one default locale happens to be created
- if (defaultLocale == null) {
- String language, region, country, variant;
- language = (String) AccessController.doPrivileged(
- new GetPropertyAction("user.language", "en" ));
- // for compatibility, check for old user.region property
- region = (String) AccessController.doPrivileged(
- new GetPropertyAction("user.region" ));
- if (region != null) {
- // region can be of form country, country_variant, or _variant
- int i = region.indexOf('_');
- if (i >= 0) {
- country = region.substring(0, i);
- variant = region.substring(i + 1);
- } else {
- country = region;
- variant = "";
- }
- } else {
- country = (String) AccessController.doPrivileged(
- new GetPropertyAction("user.country", "" ));
- variant = (String) AccessController.doPrivileged(
- new GetPropertyAction("user.variant", "" ));
- }
- defaultLocale = new Locale(language, country, variant);
- }
- return defaultLocale;
|
|