From 8d1cac6fb852c17219257c7f75694c84e782879d Mon Sep 17 00:00:00 2001 From: sunyaozu Date: Mon, 23 May 2022 17:47:51 +0800 Subject: [PATCH] add function: getAppPreferredLanguage Signed-off-by: sunyaozu --- .../reference/apis/js-apis-i18n.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 05d09096f0..f6d0841088 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-i18n.md +++ b/zh-cn/application-dev/reference/apis/js-apis-i18n.md @@ -1418,6 +1418,25 @@ getFirstPreferredLanguage(): string ``` +## i18n.getAppPreferredLanguage9+ + +getAppPreferredLanguage(): string + +获取应用的偏好语言。 + +**系统能力**:SystemCapability.Global.I18n + +**返回值:** +| 类型 | 说明 | +| ------ | -------------- | +| string | 应用的偏好语言。 | + +**示例:** + ``` + var appPreferredLanguage = i18n.getAppPreferredLanguage(); + ``` + + ## i18n.getTimeZone7+ getTimeZone(zoneID?: string): TimeZone -- GitLab