| Modifier and Type | Field and Description |
|---|---|
| public static final String | DEFAULT_SEPARATOR
The default separator to use in-between file name parts: an underscore. |
| private final ResourceLoader | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | LocalizedResourceHelper(ResourceLoader
the ResourceLoader to use resourceLoader)Create a new LocalizedResourceHelper with the given ResourceLoader. |
| Modifier and Type | Method and Description |
|---|---|
| public Resource | Returns: the most specific localized resource foundthe name of the file, without localization part nor extension name, String the file extension (e.g. ".xls") extension, Locale the current locale (may be locale)null)Find the most specific localized resource for the given name, extension and locale: The file will be searched with locations in the following order,
similar to
|
| public void |
| DEFAULT_SEPARATOR | back to summary |
|---|---|
| public static final String DEFAULT_SEPARATOR The default separator to use in-between file name parts: an underscore. | |
| resourceLoader | back to summary |
|---|---|
| private final ResourceLoader resourceLoader | |
| separator | back to summary |
|---|---|
| private String separator | |
| LocalizedResourceHelper | back to summary |
|---|---|
| public LocalizedResourceHelper() Create a new LocalizedResourceHelper with a DefaultResourceLoader. | |
| LocalizedResourceHelper | back to summary |
|---|---|
| public LocalizedResourceHelper(ResourceLoader resourceLoader) Create a new LocalizedResourceHelper with the given ResourceLoader.
| |
| findLocalizedResource | back to summary |
|---|---|
| public Resource findLocalizedResource(String name, String extension, Locale locale) Find the most specific localized resource for the given name, extension and locale: The file will be searched with locations in the following order,
similar to
If none of the specific files can be found, a resource descriptor for the default location will be returned.
| |
| setSeparator | back to summary |
|---|---|
| public void setSeparator(String separator) Set the separator to use in-between file name parts. Default is an underscore ("_"). | |