Interface I18NFacade
- All Known Implementing Classes:
DefaultI18NFacade
public interface I18NFacade
The Internationalization Facade supports retrieving Country and Region (States/Counties/Prefectures/etc) information.
ISO Codes MUST adhere to ISO 3166-1 alpha-2 for Countries and ISO 3166-2 for Regions.
-
Method Summary
Modifier and TypeMethodDescriptiongetCountryForIsocode(String isocode) Returns the country with the matching isocode parameter.Get the region data for a county and region ISO codeGet map of country iso code to list of sorted region datas for all known countries.getRegionsForCountries(Collection<String> countryIsoCodes) Get map of country iso code to list of sorted region datas for specified countries.getRegionsForCountryIso(String countryIso) Get the list of regions for a country.
-
Method Details
-
getCountryForIsocode
Returns the country with the matching isocode parameter.- Parameters:
isocode- the isocode of the country we want to return.- Returns:
- the country whose isocode matches the input parameter.
-
getRegion
Get the region data for a county and region ISO code- Parameters:
countryIso- the country iso coderegionIso- the region iso code- Returns:
- the region data
- Throws:
UnknownIdentifierException- in case no country or region can be found
-
getRegionsForCountryIso
Get the list of regions for a country. The list is sorted by region name.- Parameters:
countryIso- the country iso code- Returns:
- the list of region datas
-
getRegionsForAllCountries
Map<String,List<RegionData>> getRegionsForAllCountries()Get map of country iso code to list of sorted region datas for all known countries.- Returns:
- map of country iso code to list of sorted region datas
-
getRegionsForCountries
Get map of country iso code to list of sorted region datas for specified countries.- Parameters:
countryIsoCodes- list of country codes- Returns:
- map of country iso code to list of sorted region datas
-