public interface LanguageManager
Modifier and Type | Interface and Description |
---|---|
static interface |
LanguageManager.Info
Information about a resource in a language tree.
|
static interface |
LanguageManager.Tree
Encapsulates information about language specific existences of resources
in a tree.
|
static interface |
LanguageManager.TreeNode
Denotes a node in the tree.
|
Modifier and Type | Field and Description |
---|---|
static String |
ISO_PROP_NAME
relative path of the language property of a hierarchy node.
|
Modifier and Type | Method and Description |
---|---|
LanguageManager.Tree |
compareLanguageTrees(ResourceResolver resolver,
String path)
Compares language trees using the language of the page at the given path
as main language.
|
Map<Locale,LanguageManager.Info> |
getAdjacentInfo(ResourceResolver resolver,
String path)
Deprecated.
|
Map<Language,LanguageManager.Info> |
getAdjacentLanguageInfo(ResourceResolver resolver,
String path)
Returns a map of language information for each
language filled with information if respective hierarchy or content exists
for that language.
|
Language |
getCqLanguage(Resource res)
Returns the language for the given resource.
|
Language |
getCqLanguage(Resource res,
boolean respectContent)
Returns the language for the given resource.
|
Collection<Language> |
getCqLanguages(ResourceResolver resolver,
String path)
Returns a collection of root languages for the given page.
|
String |
getIsoCountry(Locale language)
Returns the country iso code for the given locale.
|
Locale |
getLanguage(Resource res)
Returns the language for the given resource.
|
Locale |
getLanguage(Resource res,
boolean respectContent)
Returns the language for the given resource.
|
Page |
getLanguageRoot(Resource res)
Returns the language root page for the given resource.
|
Collection<Page> |
getLanguageRoots(ResourceResolver resolver,
String path)
Returns a collection of language root pages for the given page.
|
Collection<Locale> |
getLanguages(ResourceResolver resolver,
String path)
Deprecated.
use
@getCqLanguages instead. |
static final String ISO_PROP_NAME
String getIsoCountry(Locale language)
language
- the language locale to retrieve the country fromMap<Locale,LanguageManager.Info> getAdjacentInfo(ResourceResolver resolver, String path)
getAdjacentLanguageInfo(ResourceResolver, String)
insteadresolver
- resource resolverpath
- path to checknull
if the given path does not
reside on or below a language root.LanguageUtil.getLanguageRoot(String)
Map<Language,LanguageManager.Info> getAdjacentLanguageInfo(ResourceResolver resolver, String path)
resolver
- resource resolverpath
- path to checknull
if the given path does not
reside on or below a language root.LanguageUtil.getLanguageRoot(String)
Locale getLanguage(Resource res)
res
- resourcenull
if not determinableLanguage getCqLanguage(Resource res)
res
- resourcenull
if not determinableLocale getLanguage(Resource res, boolean respectContent)
null
is returned unless respectContent
is
true
. then the resources ancestors (including the given)
one is searched for a ISO_PROP_NAME
property.res
- resourcerespectContent
- if false
only the path is analyzesnull
if not determinableLanguage getCqLanguage(Resource res, boolean respectContent)
null
is returned unless respectContent
is
true
. then the resources ancestors (including the given)
one is searched for a ISO_PROP_NAME
property.res
- resourcerespectContent
- if false
only the path is analyzesnull
if not determinablePage getLanguageRoot(Resource res)
res
- resourcenull
if not determinableCollection<Locale> getLanguages(ResourceResolver resolver, String path)
@getCqLanguages
instead.resolver
- resource resolverpath
- path of the current pageCollection<Language> getCqLanguages(ResourceResolver resolver, String path)
resolver
- resource resolverpath
- path of the current pageCollection<Page> getLanguageRoots(ResourceResolver resolver, String path)
resolver
- resource resolverpath
- path of the current pageLanguageManager.Tree compareLanguageTrees(ResourceResolver resolver, String path)
resolver
- resource resolvedpath
- path to resource to start from"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"