public class I18nRegistry extends Object
Modifier and Type | Class and Description |
---|---|
static class |
I18nRegistry.ResourceDescription
A resource is a file containing all translations for a file.
|
static class |
I18nRegistry.Translation
The Class Translation.
|
Constructor and Description |
---|
I18nRegistry()
Instantiates a new i18n registry.
|
Modifier and Type | Method and Description |
---|---|
void |
addResource(I18nRegistry.ResourceDescription description)
Add a new resource to the cache.
|
void |
addResource(URL url)
Add a new resource to the cache.
|
String |
findTranslation(Locale locale,
String key)
Tries to find the translation for the given locale and key.
|
void |
removeResource(Locale locale,
URL url)
Removes the given translations.
|
void |
removeResource(URL url)
Removes the translations with the given URL.
|
public I18nRegistry()
public String findTranslation(Locale locale, String key)
locale
- the localekey
- the keypublic void addResource(URL url)
url
- the urlpublic void addResource(I18nRegistry.ResourceDescription description)
description
- the descriptionpublic void removeResource(Locale locale, URL url)
locale
- the localeurl
- the urlpublic void removeResource(URL url)
url
- the urlCopyright © 2013-2016 Loetz GmbH&Co.KG - Heidelberg - Germany, Eclipse OSBP Project, OS.bee