title: Is there any way to sort strings in all languages?
body: <p>I have this code. It sorts correctly in French and Russian. I used Locale.US and it seems to be right. Is this solution do right with all languages out there? Does it work with other languages? For example: Chinese, Korean, Japanese... If not, what is the better solution?</p>
  
  <pre><code>public class CollationTest {
      public static void main(final String[] args) {
          final Collator collator = Collator.getInstance(Locale.US);
          final SortedSet&lt;String&gt; set = new TreeSet&lt;String&gt;(collator);
  
          set.add("abîmer");
          set.add("abîmé");
          set.add("aberrer");
          set.add("abhorrer");
          set.add("aberrance");
          set.add("abécédaire");
          set.add("abducteur");
          set.add("abdomen");
  
          set.add("государственно-монополистический");
          set.add("гостить");
          set.add("гостевой");
          set.add("гостеприимный");
          set.add("госпожа");
          set.add("госплан");
          set.add("господи");
          set.add("господа");
  
          for(final String s : set) {
              System.out.println(s);
          }
      }
  }
  </code></pre>
  
  <p><strong>Update:</strong>
  Sorry, I don't require this set must contain all languages in order. I mean this set contain one language and sort correctly in every languages.</p>
  
  <pre><code>public class CollationTest {
      public static void main(final String[] args) {
          final Collator collator = Collator.getInstance(Locale.US);
          final SortedSet&lt;String&gt; set = new TreeSet&lt;String&gt;(collator);
  
          // Sorting in French.
          set.clear();
          set.add("abîmer");
          set.add("abîmé");
          set.add("aberrer");
          set.add("abhorrer");
          set.add("aberrance");
          set.add("abécédaire");
          set.add("abducteur");
          set.add("abdomen");
          for(final String s : set) {
              System.out.println(s);
          }
  
          // Sorting in Russian.
          set.clear();
          set.add("государственно-монополистический");
          set.add("гостить");
          set.add("гостевой");
          set.add("гостеприимный");
          set.add("госпожа");
          set.add("госплан");
          set.add("господи");
          set.add("господа");
          for(final String s : set) {
              System.out.println(s);
          }
      }
  }
  </code></pre>