TextModuleData
文本模块的数据。所有字段均为选填字段。系统将显示标题(如果有),如果定义了不同类型的正文,则将串联这些正文。
JSON 表示法 |
{
"header": string,
"body": string,
"localizedHeader": {
object (LocalizedString )
},
"localizedBody": {
object (LocalizedString )
},
"id": string
} |
字段 |
body |
string
文本模块的正文,定义为不间断字符串。建议的最大长度为 500 个字符,以确保字符串能在较小的屏幕上完整显示。
|
localizedBody |
object (LocalizedString )
已翻译的正文字符串。建议的最大长度为 500 个字符,以确保字符串能在较小的屏幕上完整显示。
|
id |
string
与文本模块关联的 ID。通过此字段,您可以轻松管理文本模块,以及在模板替换项中引用这些模块。ID 应仅包含字母数字字符、“_”或“-”。它不能包含句点,因为句点用于分隔模板替换项中 FieldReference.fieldPaths 内的字段。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-13。
[null,null,["最后更新时间 (UTC):2025-03-13。"],[[["Text modules consist of a header and body, with optional localized versions for each."],["The `header` and `body` fields are strings with recommended maximum lengths for display purposes."],["Localized content can be provided using the `localizedHeader` and `localizedBody` fields, which accept LocalizedString objects."],["Each text module can have a unique `id` for management and referencing within templates, using only alphanumeric characters, '_', or '-'."]]],["The provided data defines the structure of a Text module using a JSON format. Key fields include `header`, `body`, `localizedHeader`, `localizedBody`, and `id`, all optional. Headers and bodies can be defined as strings or localized objects with recommended maximum lengths of 35 and 500 characters, respectively. The `id` field, for management, must be alphanumeric, using '_' or '-' and not '.'. Different body types will be combined, if provided.\n"]]