ThingWorx Flow > ThingWorx Flow SDK > 連接器的國際化支援
連接器的國際化支援
所有 ThingWorx Flow 連接器都支援國際化 (i18n)。
1. 開啟指令提示,然後從連接器目錄中執行下列指令:
flow add locale <language>
例如,如果您要新增英文,請鍵入下列指令:
flow add locale en 的值。
即會以下列範例範本在您的連接器目錄中建立新檔案 locales\en.json (英文語言)。
//format=i18next
{
// context: "<help for the translator> (optional)"
"<token name>": "<localized value>"
}
您也可以變更語言參數,來建立不同語言的檔案。如果您要新增法文,可以建立 fr.json 檔案,然後更新所有權杖的值。
2. 以下列格式更新所有加工品的每個 JSON 檔案內容:<connectorName:tokenId>
加工品
要更新的內容
action 資料夾
label
tags
html
input: title, displayTitle, description
output: title, displayTitle
title
trigger 資料夾
input: title,displayTitle, description
output: title, displayTitle
category
title
connection 資料夾 (\auth\connection)
title
label
input: title, displayTitle, description
output: title, displayTitle
tags
usage
其中,
connectorNamepackage.json 檔案中連接器的名稱
tokenID 是在 en.json 檔案中定義的權杖值
3. 以在連接器中定義的所有權杖及值新增或更新 en.json 檔案。
4. 儲存變更,然後部署連接器
這是否有幫助?