跳到主要內容 跳至補充內容

TRANSLATE

使用給定的字典翻譯給定的值。

語法

TRANSLATE(dictionary, keepValuesWithoutTranslation, emptyAsNull, input)

引數

名稱 類型 描述 預設值
字典 字串
keepValuesWithoutTranslation 布林值 是否保留未對應至功能中任何值的值
emptyAsNull 布林值 如果已設定,空值將會被視為 null
輸入 字串/數值

傳回

傳回 string 值。


範例

字典 keepValuesWithoutTranslation emptyAsNull 輸入 輸出
'a,Antman
b,Batman
d,' false false 'a' `Antman`
'a,Antman
b,Batman
d,' false false 'b' `Batman`
'a,Antman
b,Batman
d,' false false 'c' null
'a,Antman
b,Batman
d,' true false 'c' `c`
'a,Antman
b,Batman
d,' true true 'd' null
'a,Antman
b,Batman
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

此頁面是否對您有幫助?

若您發現此頁面或其內容有任何問題——錯字、遺漏步驟或技術錯誤——請告知我們!