diff --git a/zh-cn/application-dev/reference/apis/js-apis-i18n.md b/zh-cn/application-dev/reference/apis/js-apis-i18n.md index 553191a186b1c8db0cf82716e5f5d45b218b2a55..8d824eed79e430d8704481ca37a8243011ba834c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-i18n.md +++ b/zh-cn/application-dev/reference/apis/js-apis-i18n.md @@ -674,6 +674,31 @@ format(number: string): string ``` +### getLocationName8+ + +static getLocationName(number: string, locale: string): string + +获取电话号码归属地。 + +**系统能力**:SystemCapability.Global.I18n + +**参数:** +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ---------- | +| number | string | 是 | 电话号码 | +| locale | string | 是 | 区域ID | + +**返回值:** +| 类型 | 说明 | +| ------ | ---------- | +| string | 电话号码归属地。 | + +**示例:** + ``` + var location = i18n.PhoneNumberFormat.getLocationName('15812312345', 'zh-CN'); + ``` + + ## PhoneNumberFormatOptions8+ 表示电话号码格式化对象可设置的属性。