@Path(value="/i18n") public interface I18nResource extends AuthenticatedResource
Modifier and Type | Method and Description |
---|---|
LanguageResponse |
getLanguage()
Get the current session language
|
GenericResponse |
setLanguage(SetLanguageRequest request)
Set the current session language
|
String |
translateFromParam(String key,
List<String> parameters)
Translate the given key and optional parameters (variant with key given as query parameter)
|
String |
translateFromPath(String key,
List<String> parameters)
Translate the given key and optional parameters (variant with key given in the path)
|
setSessionId
@GET @Path(value="/t/{key}") @Produces(value="text/plain; charset=UTF-8") String translateFromPath(@PathParam(value="key") String key, @QueryParam(value="p") List<String> parameters)
key
- translation keyparameters
- optional parameters@GET @Path(value="/t") @Produces(value="text/plain; charset=UTF-8") String translateFromParam(@QueryParam(value="k") String key, @QueryParam(value="p") List<String> parameters)
key
- translation keyparameters
- optional parameters@POST @Path(value="/set") @Produces(value={"application/json; charset=UTF-8","application/xml; charset=UTF-8"}) GenericResponse setLanguage(SetLanguageRequest request)
request
- request to set the current session language@GET @Path(value="/get") @Produces(value={"application/json; charset=UTF-8","application/xml; charset=UTF-8"}) LanguageResponse getLanguage()
Copyright © 2018 Gentics Software. All rights reserved.