code: public List<Locale> getAvailableLocales(CmsObject cms, CmsResource resource) {
  
          String availableNames = null;
          try {
              availableNames = cms.readPropertyObject(
                  resource,
                  CmsPropertyDefinition.PROPERTY_AVAILABLE_LOCALES,
                  true).getValue();
          } catch (CmsException exc) {
              LOG.debug("Could not read available locales property for resource " + resource.getRootPath(), exc);
          }
  
          List<Locale> result = null;
          if (availableNames != null) {
              result = getAvailableLocales(availableNames);
          }
          if ((result == null) || (result.size() == 0)) {
              return Collections.unmodifiableList(m_availableLocales);
          } else {
              return result;
          }
      }
docs: Returns an array of available locale names for the given resource.<p>
  
  @param cms the current cms permission object
  @param resource the resource
  
  @return an array of available locale names
  
  @see #getAvailableLocales()