code: public static MetaLocale fromJavaLocale(java.util.Locale java) {
      // Some confusing cases can arise here based on the getLanguage() method
      // returning the deprecated language codes in a handful of cases. See
      // MetaLocaleTest for test cases for these examples.
      String language = java.getLanguage();
      switch (language) {
        case "iw":
          language = "he";
          break;
          
        case "in":
          language = "id";
          break;
          
        case "ji":
          language = "yi";
          break;
      }
     return new MetaLocale(language, java.getScript(), java.getCountry(), java.getVariant());
    }
docs: Constructs a MetaLocale from a Java Locale object.