LocalizationsResource
Manages localization strings.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public final class LocalizationsResourceManages localization strings. Get it from Ovok.localizations().
Methods
i18next
public LocalizationsResource.I18next i18next()Returns the i18next document routes.
Returns: the i18next routes
list
public JsonNode list(
String language,
Map<String, ?> query,
RequestOptions options) throws IOException, InterruptedExceptionLists a language's strings (GET /localization/{language}).
Parameters:
language: the language codequery: query parameters, sent as givenoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
retrieve
public JsonNode retrieve(
String language,
String key,
RequestOptions options) throws IOException, InterruptedExceptionReads one string (GET /localization/{language}/{key}).
Parameters:
language: the language codekey: the localization keyoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
update
public JsonNode update(
String language,
String key,
Object body,
RequestOptions options) throws IOException, InterruptedExceptionReplaces one string (PUT /localization/{language}/{key}).
Parameters:
language: the language codekey: the localization keybody: the new valueoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
delete
public void delete(
String language,
String key,
RequestOptions options) throws IOException, InterruptedExceptionDeletes one string (DELETE /localization/{language}/{key}).
Parameters:
language: the language codekey: the localization keyoptions: per-request options, such as the timeout
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
LocalizationsResource.I18next
public static final class I18nextReads and patches a language as one i18next document.
I18next.retrieve
public JsonNode retrieve(
String language,
RequestOptions options) throws IOException, InterruptedExceptionReads a language as an i18next document (GET /localization/i18next/{language}).
Parameters:
language: the language codeoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
I18next.update
public void update(
String language,
Object document,
RequestOptions options) throws IOException, InterruptedExceptionPatches a language's i18next document (PATCH /localization/i18next/{language}).
Parameters:
language: the language codedocument: the keys to changeoptions: per-request options, such as the timeout
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on