code: public Locale getMainLocale(String rootPath) {
  
          CmsSite site = OpenCms.getSiteManager().getSiteForRootPath(rootPath);
          if (site == null) {
              return null;
          }
          return site.getMainTranslationLocale(null);
      }
docs: Gets the main translation locale configured for the given root path.<p>
  
  @param rootPath a root path
  
  @return the main translation locale configured for the given path, or null if none was found