public class CmsSingleTreeLocaleHandler extends CmsDefaultLocaleHandler
Constructor and Description |
---|
CmsSingleTreeLocaleHandler() |
Modifier and Type | Method and Description |
---|---|
CmsI18nInfo |
getI18nInfo(javax.servlet.http.HttpServletRequest req,
CmsUser user,
CmsProject project,
java.lang.String resourceName)
Returns the i18n information to use in the request context.
|
static java.util.Locale |
getLocaleFromPath(java.lang.String sitePath)
Reads the locale from the first path element.
|
void |
initHandler(CmsObject cms)
Will be called during system startup.
|
public CmsSingleTreeLocaleHandler()
public static java.util.Locale getLocaleFromPath(java.lang.String sitePath)
sitePath
- the site path with the locale prefixnull
if no matching locale was foundpublic CmsI18nInfo getI18nInfo(javax.servlet.http.HttpServletRequest req, CmsUser user, CmsProject project, java.lang.String resourceName)
I_CmsLocaleHandler
getI18nInfo
in interface I_CmsLocaleHandler
getI18nInfo
in class CmsDefaultLocaleHandler
req
- the current http requestuser
- the current userproject
- the current projectresourceName
- the URI of the requested resource (with full site root added)CmsDefaultLocaleHandler.getI18nInfo(javax.servlet.http.HttpServletRequest, org.opencms.file.CmsUser, org.opencms.file.CmsProject, java.lang.String)
public void initHandler(CmsObject cms)
I_CmsLocaleHandler
initHandler
in interface I_CmsLocaleHandler
initHandler
in class CmsDefaultLocaleHandler
cms
- an initialized cms permission context for VFS accessI_CmsLocaleHandler.initHandler(org.opencms.file.CmsObject)