code: private URL generateMetatypePropertiesName(String metatypeName, String locale) {
          String lookupName;
          if (locale != null && locale.length() > 0) {
              lookupName = metatypeName + LOCALE_SEPARATOR + locale + PROP_EXT;
          } else {
              lookupName = metatypeName + PROP_EXT;
          }
  
          URL url = bundle.getEntry(lookupName);
  
          if (url == null) {
              int pos = locale == null ? -1 : locale.lastIndexOf(LOCALE_SEPARATOR);
              if (pos != -1) {
                  url = generateMetatypePropertiesName(metatypeName, locale.substring(0, pos));
              }
          }
          return url;
      }
docs: Tries to generate the correct metatype properties location according to locale
  
  @param metatypeName
  @return a String with the correct metatype properties location