code: protected List<Locale> getLocalesForResource(CmsObject cms, String resource) {
  
          List<Locale> locales = OpenCms.getLocaleManager().getDefaultLocales(cms, resource);
          if ((locales == null) || locales.isEmpty()) {
              locales = OpenCms.getLocaleManager().getAvailableLocales();
          }
          return locales;
      }
docs: Returns the configured default locales for the content of the given resource.<p>
  
  @param cms the cms context
  @param resource the resource path to get the default locales for
  
  @return the default locales of the resource