LocalizedLabel 類別

代表帶有語言代碼的在地標籤。

建構函式

LocalizedLabel(label: str, language_code: int, additional_properties: Dict[str, Any] | None = None)

參數

名稱 Description
label
必要
str

標籤文字。

language_code
必要
int

語言代碼(LCID),例如英語的1033。

additional_properties

可選地將額外屬性納入 Web API 有效載荷。 這些是最後合併的,可以覆寫預設值。

預設值: None

方法

to_dict

轉換成 Web API JSON 格式。

範例:


   >>> label = LocalizedLabel(label="Account", language_code=1033)
   >>> label.to_dict()
   {
       '@odata.type': 'Microsoft.Dynamics.CRM.LocalizedLabel',
       'Label': 'Account',
       'LanguageCode': 1033
   }

to_dict

轉換成 Web API JSON 格式。

範例:


   >>> label = LocalizedLabel(label="Account", language_code=1033)
   >>> label.to_dict()
   {
       '@odata.type': 'Microsoft.Dynamics.CRM.LocalizedLabel',
       'Label': 'Account',
       'LanguageCode': 1033
   }
to_dict() -> Dict[str, Any]

屬性

additional_properties

additional_properties: Dict[str, Any] | None = None

label

label: str

language_code

language_code: int