跳到主要内容 跳到补充内容

翻译

使用给定字典翻译给定值。

语法

TRANSLATE(dictionary, keepValuesWithoutTranslation, emptyAsNull, input)

参数

名称 类型 描述 默认值
字典 字符串
keepValuesWithoutTranslation 布尔值 是否保留未映射到功能中的值的值
空值视作Null 布尔值 如果设置,空值将被视作null
输入 字符串/数字

返回

返回一个 string 值。


示例

字典 keepValuesWithoutTranslation emptyAsNull 输入 输出
'a,Antman
b,Batman
d,' false false 'a' `Antman`
'a,Antman
b,Batman
d,' false false 'b' `蝙蝠侠`
'a,蚁人
b,蝙蝠侠
d,' false false 'c' null
'a,蚁人
b,蝙蝠侠
d,' true false 'c' `c`
'a,蚁人
b,蝙蝠侠
d,' true true 'd' null
'a,蚁人
b,蝙蝠侠
d,' true false 'd' ``
'1234.0,good' false false 1234 `good`
'1234.0,good' false false 1234 `good`
'0.0,good' false false 0 `good`
'-0.0,good' false false 0 `good`
'-0.0,good' false false 0 `good`
'1.23456e17,good' false false 123456000000000000 `good`
'6.000000000000001,good' false false 6 null

本页面有帮助吗?

如果您发现此页面或其内容有任何问题 – 打字错误、遗漏步骤或技术错误 – 请告诉我们!