public interface TranslationService extends Service
Messagegroup
and to replace Message tokens with values.
Learn more about
translating messages in the Developer Portal.Modifier and Type | Method and Description |
---|---|
String |
formatTranslation(String messageTemplate,
Map<String,String> params)
Replaces Message tokens with values.
|
TranslationsReadRequestBuilder |
newTranslationsReadRequestBuilder()
Creates a new instance of
TranslationsReadRequestBuilder . |
TranslationsReadResponse |
readTranslations(TranslationsReadRequest request)
Read the Messages in the given
Messagegroup and language. |
TranslationsReadRequestBuilder newTranslationsReadRequestBuilder()
TranslationsReadRequestBuilder
.TranslationsReadRequestBuilder
TranslationsReadResponse readTranslations(TranslationsReadRequest request)
Messagegroup
and language.request
- not null, specify the Messages to readTranslationsReadResponse
containing Messages in the given language, never nullIllegalArgumentException
- if request is nullString formatTranslation(String messageTemplate, Map<String,String> params)
params
map does not contain a token in the Message template, the token remains intact.
The token is in the format of ${token_name}
, where "token_name" is a string starting with a letter and
followed by zero or more letters and underscores.messageTemplate
- string with optional tokens in the format of ${token_name}
. For example,
"Weight cannot exceed ${weight_limit}
kgs."params
- not null or empty, values of tokens in the Message template if the Message has tokens. The map is
keyed by the token nameCopyright © Veeva Systems 2017–2020. All rights reserved.