docs: protected List<Locale> getContentLocales(CmsObject cms, CmsResource resource, I_CmsExtractionResult extraction) {
  
          // try to detect locale by filename
          Locale detectedLocale = CmsStringUtil.getLocaleForName(resource.getRootPath());
          if (!OpenCms.getLocaleManager().getAvailableLocales(cms, resource).contains(detectedLocale)) {
              detectedLocale = null;
          }
          // try to detect locale by language detector
          if (getIndex().isLanguageDetection()
              && (detectedLocale == null)
              && (extraction != null)
              && (extraction.getContent() != null)) {
              detectedLocale = CmsStringUtil.getLocaleForText(extraction.getContent());
          }
          // take the detected locale or use the first configured default locale for this resource
          List<Locale> result = new ArrayList<Locale>();
          if (detectedLocale != null) {
              // take the found locale
              result.add(detectedLocale);
          } else {
  
              // take all locales set via locale-available or the configured default locales as fall-back for this resource
              result.addAll(OpenCms.getLocaleManager().getAvailableLocales(cms, resource));
              LOG.debug(Messages.get().getBundle().key(Messages.LOG_LANGUAGE_DETECTION_FAILED_1, resource));
          }
          return result;
      }