Class LocalesBestResource
java.lang.Object
ch.tocco.nice2.rest.core.spi.AbstractRestResource
ch.tocco.nice2.rest.core.impl.resources.LocalesBestResource
- All Implemented Interfaces:
RestResource
This resource provides the best available locale for a given locale.
A locale can be passed with the query parameter "for".
Example:
Available locales are "de-CH", "fr-CH"
Query parameter "for": "de"
Result: "de-CH"
If no query parameter is set, the fallback language will be returned.
Resource is mapped to "/locales/best"
-
Field Summary
Fields inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
uriInfo
-
Constructor Summary
-
Method Summary
Methods inherited from class ch.tocco.nice2.rest.core.spi.AbstractRestResource
getPathParameter, setUriInfo, tryGetInt
-
Constructor Details
-
LocalesBestResource
-
-
Method Details
-
getBestLocale
@GET @Produces("application/json") public LocalesBestBean getBestLocale(@QueryParam("for") String locale)
-