code: static ResourceBundle getMessageBundle(Language lang) {
      try {
        ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, lang.getLocaleWithCountryAndVariant());
        if (!isValidBundleFor(lang, bundle)) {
          bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, lang.getLocale());
          if (!isValidBundleFor(lang, bundle)) {
            // happens if 'xx' is requested but only a MessagesBundle_xx_YY.properties exists:
            Language defaultVariant = lang.getDefaultLanguageVariant();
            if (defaultVariant != null && defaultVariant.getCountries().length > 0) {
              Locale locale = new Locale(defaultVariant.getShortCode(), defaultVariant.getCountries()[0]);
              bundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, locale);
            }
          }
        }
        ResourceBundle fallbackBundle = ResourceBundle.getBundle(MESSAGE_BUNDLE, Locale.ENGLISH);
        return new ResourceBundleWithFallback(bundle, fallbackBundle);
      } catch (MissingResourceException e) {
        return ResourceBundle.getBundle(MESSAGE_BUNDLE, Locale.ENGLISH);
      }
    }
docs: Gets the ResourceBundle (i18n strings) for the given user interface language.