code: public static String toUnicodeLocaleType(String keyword, String value) {
          String bcpType = KeyTypeData.toBcpType(keyword, value, null, null);
          if (bcpType == null && UnicodeLocaleExtension.isType(value)) {
              // unknown keyword, but syntax is fine..
              bcpType = AsciiUtil.toLowerString(value);
          }
          return bcpType;
      }
docs: <strong>[icu]</strong> Converts the specified keyword value (legacy type, or BCP 47
  Unicode locale extension type) to the well-formed BCP 47 Unicode locale
  extension type for the specified keyword (category). For example, BCP 47
  Unicode locale extension type "phonebk" is returned for the input
  keyword value "phonebook", with the keyword "collation" (or "co").
  <p>
  When the specified keyword is not recognized, but the specified value
  satisfies the syntax of the BCP 47 Unicode locale extension type,
  or when the specified keyword allows 'variable' type and the specified
  value satisfies the syntax, the lower-case version of the input value
  will be returned. For example,
  <code>toUnicodeLocaleType("Foo", "Bar")</code> returns "bar",
  <code>toUnicodeLocaleType("variableTop", "00A4")</code> returns "00a4".
  
  @param keyword       the locale keyword (either legacy key such as
  "collation" or BCP 47 Unicode locale extension
  key such as "co").
  @param value         the locale keyword value (either legacy type
  such as "phonebook" or BCP 47 Unicode locale extension
  type such as "phonebk").
  @return              the well-formed BCP47 Unicode locale extension type,
  or null if the locale keyword value cannot be mapped to
  a well-formed BCP 47 Unicode locale extension type.
  @see #toLegacyType(String, String)