code: public static List<String> getAvailableLocaleSuffixes(String messageBundles, String fileSuffix,
  			ServletContext servletContext) {
  		Set<String> availableLocaleSuffixes = new HashSet<>();
  		Locale[] availableLocales = Locale.getAvailableLocales();
  
  		String[] msgBundleArray = messageBundles.split("\\|");
  
  		for (String messageBundle : msgBundleArray) {
  			addSuffixIfAvailable(messageBundle, availableLocaleSuffixes, null, fileSuffix, servletContext);
  
  			for (Locale locale : availableLocales) {
  				addSuffixIfAvailable(messageBundle, availableLocaleSuffixes, locale, fileSuffix, servletContext);
  			}
  		}
  
  		return new ArrayList<>(availableLocaleSuffixes);
  	}
docs: Returns the list of available locale suffixes for a message resource
  bundle
  
  @param messageBundles
  the message bundles
  @param fileSuffix
  the file suffix
  @param servletContext
  the servlet context
  @return the list of available locale suffixes for a message resource
  bundle