code: private void removeAllLocalesExcept(CmsXmlContainerPage page, Locale localeToKeep) throws CmsXmlException {
  
          List<Locale> locales = page.getLocales();
          for (Locale locale : locales) {
              if (!locale.equals(localeToKeep)) {
                  page.removeLocale(locale);
              }
          }
      }
docs: Helper method for removing all locales except one from a container page.<p>
  
  @param page the container page to proces
  @param localeToKeep the locale which should be kept
  
  @throws CmsXmlException if something goes wrong