Class LocalesBestResource

All Implemented Interfaces:

@Path("/locales/best") public class LocalesBestResource extends AbstractRestResource
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"
  • Constructor Details

    • LocalesBestResource

      public LocalesBestResource(L10N l10N)
  • Method Details

    • getBestLocale

      @GET @Produces("application/json") public LocalesBestBean getBestLocale(@QueryParam("for") String locale)