@StableMinor(version="12.2", sinceVersion="4.2") public interface ILocalizationManager
Modifier and Type | Field and Description |
---|---|
static String |
DO_NOT_RENDER_PARAMETERS |
Modifier and Type | Method and Description |
---|---|
void |
add(LocaleConfig locale)
Adds the given locale.
|
String |
addCustomString(SessionConfig sessionConfig,
CustomStringConfig customStringConfig,
ITransaction transaction)
Add a Custom String
|
void |
clearCache()
Clear the localization cache.
|
void |
clearCache(String resourcePath)
Clear the localization cache by passing the resource path.
|
void |
clearCache(String resourcePath,
Locale locale)
Clear the localization cache by passing the resource path and the locale.
|
void |
delete(String id)
Deletes the locale with the given identifier.
|
void |
deleteCustomString(SessionConfig sessionConfig,
String customStringId,
ITransaction transaction)
Delete a specified Custom String
|
Iterable<String> |
getCachedResourcePaths()
Deprecated.
Since 8.1.0, this method is no longer available and always returns an empty iterable.
|
CustomStringConfig |
getCustomString(SessionConfig sessionConfig,
String customStringId,
ITransaction transaction)
Get the Custom String object
|
Locale |
getDefaultLocale()
Returns the portal default locale.
|
Collection<Locale> |
getLocales()
Returns all locales currently available in the portal.
|
Collection<LocaleConfig> |
getLocales(ITransaction transaction)
Returns the available locales for the portal.
|
String |
localize(String id,
IResource resource)
Localizes the given string id using the given resource and current locale.
|
String |
localize(String id,
IResource resource,
Locale locale)
Localizes the given string id using the given resource and locale.
|
String |
localize(String id,
IResource resource,
Locale locale,
WebResource webResource)
Localizes the given string id using the given resource,
WebResource and locale. |
String |
localize(String id,
IResource resource,
PageWebResource pageWebResource)
Localizes the given string id using the given resource,
PageWebResource and current locale. |
String |
localize(String id,
List<IResource> resources)
Localizes the given string id using the given resources and current locale.
|
String |
localize(String id,
List<IResource> resources,
Locale locale)
Localizes the given string id using the given resources and locale.
|
String |
localize(String id,
List<IResource> resources,
Locale locale,
WebResource pageWebResource)
Localizes the given string id using the given resources,
WebResource and locale. |
String |
localize(String id,
List<IResource> resources,
PageWebResource pageWebResource)
Localizes the given string id using the given resources,
PageWebResource and current locale. |
void |
update(LocaleConfig locale)
Updates the given locale.
|
void |
updateCustomString(SessionConfig sessionConfig,
CustomStringConfig customStringConfig,
ITransaction transaction)
Update a specified Custom String
|
static final String DO_NOT_RENDER_PARAMETERS
Collection<LocaleConfig> getLocales(ITransaction transaction) throws PortalException
transaction
- the transaction for persistence access.PortalException
Collection<Locale> getLocales()
Locale getDefaultLocale()
void add(LocaleConfig locale) throws PortalException
locale
- the locale to be added.PortalException
void delete(String id) throws PortalException
id
- the locale identifier.PortalException
void update(LocaleConfig locale) throws PortalException
locale
- the locale to be updated.PortalException
String localize(String id, IResource resource) throws PortalException
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
localize(String, IResource, PageWebResource)
.id
- The string id to localizeresource
- The resource to search for localizationsPortalException
String localize(String id, IResource resource, PageWebResource pageWebResource) throws PortalException
PageWebResource
and current locale.
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
id
- The string id to localizeresource
- The resource to search for localizationspageWebResource
- The PageWebResource
used to search for localizations within themes.PortalException
String localize(String id, List<IResource> resources) throws PortalException
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
localize(String, List, PageWebResource)
.id
- The string id to localizeresources
- The resources to search for localizationsPortalException
String localize(String id, List<IResource> resources, PageWebResource pageWebResource) throws PortalException
PageWebResource
and current locale.
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
id
- The string id to localizeresources
- The resources to search for localizationspageWebResource
- The PageWebResource
used to search for localizations within themes.PortalException
String localize(String id, IResource resource, Locale locale) throws PortalException
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
#localize(String, IResource, Locale, PageWebResource)
.id
- The string id to localizeresource
- The resource to search for localizationslocale
- The locale to use for localizationPortalException
String localize(String id, IResource resource, Locale locale, WebResource webResource) throws PortalException
WebResource
and locale.
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
id
- The string id to localizeresource
- The resources to search for localizationslocale
- The locale to use for localizationwebResource
- The WebResource
used to search for localizations within themes.PortalException
String localize(String id, List<IResource> resources, Locale locale) throws PortalException
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
#localize(String, List, Locale, PageWebResource)
.id
- The string id to localizeresources
- The resources to search for localizationslocale
- The locale to use for localizationPortalException
String localize(String id, List<IResource> resources, Locale locale, WebResource pageWebResource) throws PortalException
WebResource
and locale.
If no localized value is found for the given id, the id itself is returned.
If the string id passed in is null, the return value will also be null.
id
- The string id to localizeresources
- The resources to search for localizationslocale
- The locale to use for localizationwebResource
- The WebResource
used to search for localizations within themes.PortalException
void clearCache() throws PortalException
PortalException
void clearCache(String resourcePath) throws PortalException
resourcePath
- PortalException
void clearCache(String resourcePath, Locale locale) throws PortalException
resourcePath
- locale
- PortalException
@Deprecated Iterable<String> getCachedResourcePaths() throws ManagerException
ManagerException
String addCustomString(SessionConfig sessionConfig, CustomStringConfig customStringConfig, ITransaction transaction) throws PortalException
sessionConfig
- customStringConfig
- transaction
- PortalException
void updateCustomString(SessionConfig sessionConfig, CustomStringConfig customStringConfig, ITransaction transaction) throws PortalException
sessionConfig
- customStringConfig
- transaction
- PortalException
void deleteCustomString(SessionConfig sessionConfig, String customStringId, ITransaction transaction) throws PortalException
sessionConfig
- customStringId
- transaction
- PortalException
CustomStringConfig getCustomString(SessionConfig sessionConfig, String customStringId, ITransaction transaction) throws PortalException
sessionConfig
- customStringId
- transaction
- PortalException
LumisXP 12.2.0.200122 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.