提交 b0ee69f4 编写于 作者: S shawn_he

update docs

Signed-off-by: Nshawn_he <shawn.he@huawei.com>
上级 9de0768f
...@@ -673,6 +673,32 @@ Formats a phone number. ...@@ -673,6 +673,32 @@ Formats a phone number.
phonenumberfmt.format("15812312312"); phonenumberfmt.format("15812312312");
``` ```
### getLocationName<sup>8+</sup>
static getLocationName(number: string, locale: string): string
Obtains the home location of a phone number.
**System capability**: SystemCapability.Global.I18n
**Parameters**
| Name | Type | Mandatory | Description |
| ------ | ------ | ---- | ---------- |
| number | string | Yes | Phone number.|
| locale | string | Yes | Locale ID.|
**Return value**
| Type | Description |
| ------ | ---------- |
| string | Home location of the phone number.|
**Example**
```
var location = i18n.PhoneNumberFormat.getLocationName('15812312345', 'zh-CN');
```
## PhoneNumberFormatOptions<sup>8+</sup> ## PhoneNumberFormatOptions<sup>8+</sup>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册