LocalizedString
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
字段 |
kind (deprecated) |
string
指明资源的类型。值:固定字符串 "walletobjects#localizedString" 。
|
translatedValues[] |
object (TranslatedString )
包含字符串的译文。
|
defaultValue |
object (TranslatedString )
包含在缺少适当翻译时显示的字符串。
|
TranslatedString
JSON 表示法 |
{
"kind": string,
"language": string,
"value": string
} |
字段 |
kind (deprecated) |
string
指明资源的类型。值:固定字符串 "walletobjects#translatedString" 。
|
language |
string
表示 BCP 47 语言标记。示例值包括“en-US”、“en-GB”、“de”或“de-AT”。
|
value |
string
以 UTF-8 编码的已翻译字符串。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003ccode\u003eLocalizedString\u003c/code\u003e objects store translations for a string, including a default value if no translation is available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etranslatedValues\u003c/code\u003e field within \u003ccode\u003eLocalizedString\u003c/code\u003e holds an array of \u003ccode\u003eTranslatedString\u003c/code\u003e objects, each representing a translation in a specific language.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTranslatedString\u003c/code\u003e objects contain the language code (\u003ccode\u003elanguage\u003c/code\u003e) and the actual translated string (\u003ccode\u003evalue\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eIf no suitable translation is found in \u003ccode\u003etranslatedValues\u003c/code\u003e, the \u003ccode\u003edefaultValue\u003c/code\u003e field's \u003ccode\u003eTranslatedString\u003c/code\u003e object is used for display.\u003c/p\u003e\n"]]],["The document outlines JSON structures for representing localized strings. A main structure contains a deprecated `kind`, an array of `translatedValues` (objects), and a `defaultValue` (object). Each `translatedValue` and `defaultValue` includes another structure with a deprecated `kind`, a `language` tag (BCP 47 format), and a `value` representing the UTF-8 encoded translated string. These structures enable managing multiple language translations for a given string.\n"],null,["# LocalizedString\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [TranslatedString](#TranslatedString)\n - [JSON representation](#TranslatedString.SCHEMA_REPRESENTATION)\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"kind\": string, \"translatedValues\": [ { object (/wallet/reference/rest/v1/LocalizedString#TranslatedString) } ], \"defaultValue\": { object (/wallet/reference/rest/v1/LocalizedString#TranslatedString) } } ``` |\n\n| Fields ||\n|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` **(deprecated)** | `string` | This item is deprecated! Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#localizedString\"`. |\n| `translatedValues[]` | `object (`[TranslatedString](/wallet/reference/rest/v1/LocalizedString#TranslatedString)`)` Contains the translations for the string. |\n| `defaultValue` | `object (`[TranslatedString](/wallet/reference/rest/v1/LocalizedString#TranslatedString)`)` Contains the string to be displayed if no appropriate translation is available. |\n\nTranslatedString\n----------------\n\n| JSON representation |\n|-----------------------------------------------------------------|\n| ``` { \"kind\": string, \"language\": string, \"value\": string } ``` |\n\n| Fields ||\n|-------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| `kind` **(deprecated)** | `string` | This item is deprecated! Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#translatedString\"`. |\n| `language` | `string` Represents the BCP 47 language tag. Example values are \"en-US\", \"en-GB\", \"de\", or \"de-AT\". |\n| `value` | `string` The UTF-8 encoded translated string. |"]]