UserFacingMessage
Provides a user-facing message with locale info. The maximum message length is 4096 characters.
JSON representation |
{
"localizedMessages": {
string: string,
...
},
"defaultMessage": string
} |
Fields |
localizedMessages |
map (key: string, value: string)
A map containing <locale, message> pairs, where locale is a well-formed BCP 47 language code, such as en-US, es-ES, or fr. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" } .
|
defaultMessage |
string
The default message displayed if no localized message is specified or the user's locale doesn't match with any of the localized messages. A default message must be provided if any localized messages are provided.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-19 UTC.
[null,null,["Last updated 2025-02-19 UTC."],[[["The JSON representation is used to provide user-facing messages with locale information, with a maximum length of 4096 characters."],["It includes `localizedMessages`, a map of locale codes and corresponding messages, and `defaultMessage` for fallback display."],["A well-formed BCP 47 language code is used for locale specification, and a default message is required if localized messages are provided."]]],["The content defines a JSON structure for user-facing messages with locale support. It includes `localizedMessages`, a map where keys are BCP 47 language codes and values are translated messages. The `defaultMessage` field is a string providing a fallback message when no matching locale is found. `localizedMessages` holds key-value message pairs, and a default message is required if there are any localized ones. The maximum message length is 4096 characters.\n"]]