org.modeshape.common.i18n
Interface LocalizationRepository

All Known Implementing Classes:
ClasspathLocalizationRepository

public interface LocalizationRepository

A repository of localized property files used by the internationalization framework.


Method Summary
 URL getLocalizationBundle(String bundleName, Locale locale)
          Obtain the URL to the properties file containing the localized messages given the supplied bundle name.
 List<String> getPathsToSearchForBundle(String bundleName, Locale locale)
          Returns a list of paths (as string) of the different bundles searched in the getLocalizationBundle(String, java.util.Locale) method.
 

Method Detail

getLocalizationBundle

URL getLocalizationBundle(String bundleName,
                          Locale locale)
Obtain the URL to the properties file containing the localized messages given the supplied bundle name. This method is responsible for searching to find the most appropriate localized messages given the locale, but does not need to search using the default locale (as that is done by the calling method.

Parameters:
bundleName - the name of the bundle of properties; never null
locale - the locale for which the properties file URL is desired
Returns:
the URL to the properties file containing the localized messages for the named bundle, or null if no such bundle could be found

getPathsToSearchForBundle

List<String> getPathsToSearchForBundle(String bundleName,
                                       Locale locale)
Returns a list of paths (as string) of the different bundles searched in the getLocalizationBundle(String, java.util.Locale) method.

Parameters:
bundleName - the name of the bundle of properties; never null
locale - the locale for which the properties file URL is desired
Returns:
a list of paths which the repository would look at.


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.