code: protected Locale getLocaleForNewContent(
          CmsObject cms,
          CmsSecurityManager securityManager,
          String resourcename,
          List<CmsProperty> properties) {
  
          Locale locale = (Locale)(cms.getRequestContext().getAttribute(CmsRequestContext.ATTRIBUTE_NEW_RESOURCE_LOCALE));
          if (locale != null) {
              return locale;
          }
          List<Locale> locales = OpenCms.getLocaleManager().getDefaultLocales(
              cms,
              CmsResource.getParentFolder(resourcename));
          return locales.get(0);
      }
docs: Gets the locale which should be used for creating an empty content.<p>
  
  @param cms the current CMS context
  @param securityManager the security manager
  @param resourcename the name of the resource to create
  @param properties the properties for the resource to create
  
  @return the locale to use