some good things for playing with java.util.Locale
Java
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits behind CleverCloud:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
README
pom.xml

README

This is just a useful thing for people working with java.util.Locale

The main problem is about getting the nearest Locale in a Set<Locale>


example :
---------------------------------------------------
LocaleSet ls = new LocaleSet();
ls.add(Locale.UK);
ls.add(Locale.FRANCE);
ls.add(Locale.CHINA);

List<Locale> ll = new ArrayList<Locale>();
ll.add(Locale.US);

ls.getTheBestLocale(ll) return Locale.UK

---------------------------------------------------

You can change the default choice for a LocaleSet with the ls.setSpecificLocaleDefault(mylocale) method
The default is system Locale

Look at the tests for more information