• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# @ohos.i18n (Internationalization) (System API)
2
3 This module provides system-related or enhanced i18n capabilities, such as locale management, phone number formatting, and calendar, through supplementary i18n APIs that are not defined in ECMA 402. The [intl](js-apis-intl.md) module provides basic i18n capabilities through the standard i18n APIs defined in ECMA 402. It works with the **i18n** module to provide a complete suite of i18n capabilities.
4
5>  **NOTE**
6>  - The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
7>
8>  - Since API version 11, some APIs of this module are supported in ArkTS widgets.
9>
10>  - This topic describes only system APIs provided by the module. For details about its public APIs, see [@ohos.i18n (Internationalization)](js-apis-intl.md).
11
12
13## Modules to Import
14
15```ts
16import { i18n } from '@kit.LocalizationKit';
17```
18
19## System<sup>9+</sup>
20
21### setSystemLanguage<sup>9+</sup>
22
23static setSystemLanguage(language: string): void
24
25Sets the system language. Currently, this API does not support real-time updating of the system language.
26
27To listen for system language changes, enable listening for [COMMON_EVENT_LOCALE_CHANGED](../apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_locale_changed).
28
29**System API**: This is a system API.
30
31**Permission required**: ohos.permission.UPDATE_CONFIGURATION
32
33**System capability**: SystemCapability.Global.I18n
34
35**Parameters**
36
37| Name     | Type    | Mandatory  | Description   |
38| -------- | ------ | ---- | ----- |
39| language | string | Yes   | Valid language ID.|
40
41**Error codes**
42
43For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
44
45| ID | Error Message                  |
46| ------ | ---------------------- |
47| 201 | Permission verification failed. The application does not have the permission required to call the API. |
48| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
49| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
50
51**Example**
52  ```ts
53  import { BusinessError, commonEventManager } from '@kit.BasicServicesKit';
54
55  // Set the system language
56  try {
57    i18n.System.setSystemLanguage('zh'); // Set the current system language to zh.
58  } catch(error) {
59    let err: BusinessError = error as BusinessError;
60    console.error(`call System.setSystemLanguage failed, error code: ${err.code}, message: ${err.message}.`);
61  }
62
63  // Subscribe to a common event.
64  let subscriber: commonEventManager.CommonEventSubscriber; // Used to save the created subscriber object for subsequent subscription and unsubscription.
65  let subscribeInfo: commonEventManager.CommonEventSubscribeInfo = { // Define subscriber information.
66    events: [commonEventManager.Support.COMMON_EVENT_LOCALE_CHANGED]
67  };
68  commonEventManager.createSubscriber(subscribeInfo).then((commonEventSubscriber:commonEventManager.CommonEventSubscriber) => { // Create a subscriber.
69      console.info("createSubscriber");
70      subscriber = commonEventSubscriber;
71      commonEventManager.subscribe(subscriber, (err, data) => {
72        if (err) {
73          console.error(`Failed to subscribe common event. error code: ${err.code}, message: ${err.message}.`);
74          return;
75        }
76        console.info("the subscribed event has occurred."); // Triggered when the subscribed event occurs.
77      })
78  }).catch((err: BusinessError) => {
79      console.error(`createSubscriber failed, code is ${err.code}, message is ${err.message}`);
80  });
81  ```
82
83### setSystemRegion<sup>9+</sup>
84
85static setSystemRegion(region: string): void
86
87Sets the system region.
88
89To listen for system region changes, enable listening for [COMMON_EVENT_LOCALE_CHANGED](../apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_locale_changed).
90
91**System API**: This is a system API.
92
93**Permission required**: ohos.permission.UPDATE_CONFIGURATION
94
95**System capability**: SystemCapability.Global.I18n
96
97**Parameters**
98
99| Name   | Type    | Mandatory  | Description   |
100| ------ | ------ | ---- | ----- |
101| region | string | Yes   | Valid region ID.|
102
103**Error codes**
104
105For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
106
107| ID | Error Message                  |
108| ------ | ---------------------- |
109| 201 | Permission verification failed. The application does not have the permission required to call the API. |
110| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
111| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
112
113**Example**
114  ```ts
115  import { BusinessError } from '@kit.BasicServicesKit';
116
117  try {
118    i18n.System.setSystemRegion('CN'); // Set the current system region to CN.
119  } catch(error) {
120    let err: BusinessError = error as BusinessError;
121    console.error(`call System.setSystemRegion failed, error code: ${err.code}, message: ${err.message}.`);
122  }
123  ```
124
125
126
127### setSystemLocale<sup>9+</sup>
128
129static setSystemLocale(locale: string): void
130
131Sets the system locale.
132
133To listen for system locale changes, enable listening for [COMMON_EVENT_LOCALE_CHANGED](../apis-basic-services-kit/common_event/commonEventManager-definitions.md#common_event_locale_changed).
134
135**System API**: This is a system API.
136
137**Permission required**: ohos.permission.UPDATE_CONFIGURATION
138
139**System capability**: SystemCapability.Global.I18n
140
141**Parameters**
142
143| Name   | Type    | Mandatory  | Description             |
144| ------ | ------ | ---- | --------------- |
145| locale | string | Yes   | [Locale information](../../internationalization/i18n-locale-culture.md#how-it-works), which consists of the language, script, and country/region.|
146
147**Error codes**
148
149For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
150
151| ID | Error Message                  |
152| ------ | ---------------------- |
153| 201 | Permission verification failed. The application does not have the permission required to call the API. |
154| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
155| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
156
157**Example**
158  ```ts
159  import { BusinessError } from '@kit.BasicServicesKit';
160
161  try {
162    i18n.System.setSystemLocale('zh-CN'); // Set the current system locale to zh-CN.
163  } catch(error) {
164    let err: BusinessError = error as BusinessError;
165    console.error(`call System.setSystemLocale failed, error code: ${err.code}, message: ${err.message}.`);
166  }
167  ```
168
169
170### set24HourClock<sup>9+</sup>
171
172static set24HourClock(option: boolean): void
173
174Sets the system time to the 24-hour clock.
175
176**System API**: This is a system API.
177
178**Permission required**: ohos.permission.UPDATE_CONFIGURATION
179
180**System capability**: SystemCapability.Global.I18n
181
182**Parameters**
183
184| Name   | Type     | Mandatory  | Description                                      |
185| ------ | ------- | ---- | ---------------------------------------- |
186| option | boolean | Yes   | Whether to enable the 24-hour clock. The value **true** means to enable the 24-hour clock, and the value **false** means the opposite.|
187
188**Error codes**
189
190For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
191
192| ID | Error Message                  |
193| ------ | ---------------------- |
194| 201 | Permission verification failed. The application does not have the permission required to call the API. |
195| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
196| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
197
198**Example**
199  ```ts
200  import { BusinessError } from '@kit.BasicServicesKit';
201
202  // Set the system time to the 24-hour clock.
203  try {
204    i18n.System.set24HourClock(true);
205  } catch(error) {
206    let err: BusinessError = error as BusinessError;
207    console.error(`call System.set24HourClock failed, error code: ${err.code}, message: ${err.message}.`);
208  }
209  ```
210
211### addPreferredLanguage<sup>9+</sup>
212
213static addPreferredLanguage(language: string, index?: number): void
214
215Adds a preferred language to the specified position on the preferred language list.
216
217**System API**: This is a system API.
218
219**Permission required**: ohos.permission.UPDATE_CONFIGURATION
220
221**System capability**: SystemCapability.Global.I18n
222
223**Parameters**
224
225| Name     | Type    | Mandatory  | Description        |
226| -------- | ------ | ---- | ---------- |
227| language | string | Yes   | Valid ID of the language to be added as a preferred language. |
228| index    | number | No   | Position to which the preferred language is added. The default value is the length of the preferred language list.|
229
230**Error codes**
231
232For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
233
234| ID | Error Message                  |
235| ------ | ---------------------- |
236| 201 | Permission verification failed. The application does not have the permission required to call the API. |
237| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
238| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
239
240**Example**
241  ```ts
242  import { BusinessError } from '@kit.BasicServicesKit';
243
244  // Add zh-CN to the preferred language list.
245  let language = 'zh-CN';
246  let index = 0;
247  try {
248    i18n.System.addPreferredLanguage(language, index); // Add zh-CN to the first place in the preferred language list.
249  } catch(error) {
250    let err: BusinessError = error as BusinessError;
251    console.error(`call System.addPreferredLanguage failed, error code: ${err.code}, message: ${err.message}.`);
252  }
253  ```
254
255### removePreferredLanguage<sup>9+</sup>
256
257static removePreferredLanguage(index: number): void
258
259Deletes a preferred language from the specified position on the preferred language list.
260
261**System API**: This is a system API.
262
263**Permission required**: ohos.permission.UPDATE_CONFIGURATION
264
265**System capability**: SystemCapability.Global.I18n
266
267**Parameters**
268
269| Name  | Type    | Mandatory  | Description                   |
270| ----- | ------ | ---- | --------------------- |
271| index | number | Yes   | Position of the preferred language to delete.|
272
273**Error codes**
274
275For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
276
277| ID | Error Message                  |
278| ------ | ---------------------- |
279| 201 | Permission verification failed. The application does not have the permission required to call the API. |
280| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
281| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
282
283**Example**
284  ```ts
285  import { BusinessError } from '@kit.BasicServicesKit';
286
287  // Delete the first preferred language from the preferred language list.
288  let index: number = 0;
289  try {
290    i18n.System.removePreferredLanguage(index);
291  } catch(error) {
292    let err: BusinessError = error as BusinessError;
293    console.error(`call System.removePreferredLanguage failed, error code: ${err.code}, message: ${err.message}.`);
294  }
295  ```
296
297### setUsingLocalDigit<sup>9+</sup>
298
299static setUsingLocalDigit(flag: boolean): void
300
301Specifies whether to enable use of local digits.
302
303**System API**: This is a system API.
304
305**Permission required**: ohos.permission.UPDATE_CONFIGURATION
306
307**System capability**: SystemCapability.Global.I18n
308
309**Parameters**
310
311| Name | Type     | Mandatory  | Description                             |
312| ---- | ------- | ---- | ------------------------------- |
313| flag | boolean | Yes   | Whether to turn on the local digit switch. The value **true** means to turn on the local digit switch, and the value **false** indicates the opposite.|
314
315**Error codes**
316
317For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
318
319| ID | Error Message                  |
320| ------ | ---------------------- |
321| 201 | Permission verification failed. The application does not have the permission required to call the API. |
322| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
323| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
324
325**Example**
326  ```ts
327  import { BusinessError } from '@kit.BasicServicesKit';
328
329  try {
330    i18n.System.setUsingLocalDigit(true); // Enable the local digit switch.
331  } catch(error) {
332    let err: BusinessError = error as BusinessError;
333    console.error(`call System.setUsingLocalDigit failed, error code: ${err.code}, message: ${err.message}.`);
334  }
335  ```
336
337
338### setTemperatureType<sup>18+</sup>
339
340static setTemperatureType(type: TemperatureType): void
341
342Sets the preferred temperature unit for users.
343
344**System API**: This is a system API.
345
346**Permission required**: ohos.permission.UPDATE_CONFIGURATION
347
348**System capability**: SystemCapability.Global.I18n
349
350**Parameters**
351
352| Name | Type     | Mandatory  | Description                             |
353| ---- | ------- | ---- | ------------------------------- |
354| type | [TemperatureType](./js-apis-i18n.md#temperaturetype18) | Yes| Temperature unit.|
355
356**Error codes**
357
358For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
359
360| ID | Error Message                  |
361| ------ | ---------------------- |
362| 201 | Permission verification failed. The application does not have the permission required to call the API. |
363| 202 | Permission verification failed. A non-system application calls a system API. |
364| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
365| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
366
367> **NOTE**
368>
369> The error message of 890001 is subject to the actual error.
370
371**Example**
372  ```ts
373  import { BusinessError } from '@kit.BasicServicesKit';
374
375  try {
376    i18n.System.setTemperatureType(i18n.TemperatureType.CELSIUS); //: Set the temperature unit to °C.
377  } catch(error) {
378    let err: BusinessError = error as BusinessError;
379    console.error(`call System.setTemperatureType failed, error code: ${err.code}, message: ${err.message}.`);
380  }
381  ```
382
383### setFirstDayOfWeek<sup>18+</sup>
384
385static setFirstDayOfWeek(type: WeekDay): void
386
387Sets the preferred start day of a week for users.
388
389**System API**: This is a system API.
390
391**Permission required**: ohos.permission.UPDATE_CONFIGURATION
392
393**System capability**: SystemCapability.Global.I18n
394
395**Parameters**
396
397| Name | Type     | Mandatory  | Description                             |
398| ---- | ------- | ---- | ------------------------------- |
399| type | [WeekDay](./js-apis-i18n.md#weekday18) | Yes| Start day of a week.|
400
401**Error codes**
402
403For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
404
405| ID | Error Message                  |
406| ------ | ---------------------- |
407| 201 | Permission verification failed. The application does not have the permission required to call the API. |
408| 202 | Permission verification failed. A non-system application calls a system API. |
409| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
410| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
411
412> **NOTE**
413>
414> The error message of 890001 is subject to the actual error.
415
416**Example**
417  ```ts
418  import { BusinessError } from '@kit.BasicServicesKit';
419
420  try {
421    i18n.System.setFirstDayOfWeek (i18n.WeekDay.MON); // Set the preferred start day of a week to Monday.
422  } catch(error) {
423    let err: BusinessError = error as BusinessError;
424    console.error(`call System.setFirstDayOfWeek failed, error code: ${err.code}, message: ${err.message}.`);
425  }
426  ```
427
428
429## SystemLocaleManager<sup>10+</sup>
430
431### constructor<sup>10+</sup>
432
433constructor()
434
435Creates a **SystemLocaleManager** object.
436
437**System API**: This is a system API.
438
439**System capability**: SystemCapability.Global.I18n
440
441**Example**
442  ```ts
443  let systemLocaleManager: i18n.SystemLocaleManager = new i18n.SystemLocaleManager();
444  ```
445
446
447### getLanguageInfoArray<sup>10+</sup>
448
449getLanguageInfoArray(languages: Array&lt;string&gt;, options?: SortOptions): Array&lt;LocaleItem&gt;
450
451Obtains the language sorting array.
452
453**System API**: This is a system API.
454
455**System capability**: SystemCapability.Global.I18n
456
457**Parameters**
458
459|   Name |      Type     | Mandatory|     Description     |
460| --------- | ------------- | ---- | ------------- |
461| languages | Array&lt;string&gt; | Yes  | Valid IDs of the languages to be sorted.|
462| options   | [SortOptions](#sortoptions10)   | No  | Language sorting option.|
463
464**Return value**
465
466|       Type       |         Description         |
467| ----------------- | -------------------- |
468| Array&lt;[LocaleItem](#localeitem10)&gt; | Language list after sorting.|
469
470**Error codes**
471
472For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
473
474| ID | Error Message                  |
475| ------ | ---------------------- |
476| 202 | Permission verification failed. A non-system application calls a system API. |
477| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
478| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
479
480**Example**
481  ```ts
482  import { BusinessError } from '@kit.BasicServicesKit';
483
484  // Assume that the system language is zh-Hans, the system region is CN, and the system locale is zh-Hans-CN.
485  let systemLocaleManager: i18n.SystemLocaleManager = new i18n.SystemLocaleManager();
486  let languages: string[] = ["zh-Hans", "en-US", "pt", "ar"];
487  let sortOptions: i18n.SortOptions = {locale: "zh-Hans-CN", isUseLocalName: true, isSuggestedFirst: true};
488  try {
489      // The language list after sorting is [zh-Hans, en-US, pt, ar].
490      let sortedLanguages: Array<i18n.LocaleItem> = systemLocaleManager.getLanguageInfoArray(languages, sortOptions);
491  } catch(error) {
492      let err: BusinessError = error as BusinessError;
493      console.error(`call systemLocaleManager.getLanguageInfoArray failed, error code: ${err.code}, message: ${err.message}.`);
494  }
495  ```
496
497
498### getRegionInfoArray<sup>10+</sup>
499
500getRegionInfoArray(regions: Array&lt;string&gt;, options?: SortOptions): Array&lt;LocaleItem&gt;
501
502Obtains the country/region sorting array.
503
504**System API**: This is a system API.
505
506**System capability**: SystemCapability.Global.I18n
507
508**Parameters**
509
510|   Name |      Type     | Mandatory|     Description     |
511| --------- | ------------- | ---- | ------------- |
512| regions   | Array&lt;string&gt; | Yes  | Valid IDs of the countries or regions to be sorted.|
513| options   | [SortOptions](#sortoptions10)   | No  | Country/region sorting option.<br>The default value of **locale** is the system locale, the default value of **isUseLocalName** is **false**, and the default value of **isSuggestedFirst** is **true**.|
514
515**Return value**
516
517|       Type       |         Description         |
518| ----------------- | -------------------- |
519| Array&lt;[LocaleItem](#localeitem10)&gt; | Country/region list after sorting.|
520
521**Error codes**
522
523For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
524
525| ID | Error Message                  |
526| ------ | ---------------------- |
527| 202 | Permission verification failed. A non-system application calls a system API. |
528| 401 | Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. |
529| 890001 | Invalid parameter. Possible causes: Parameter verification failed. |
530
531**Example**
532  ```ts
533  import { BusinessError } from '@kit.BasicServicesKit';
534
535  // Assume that the system language is zh-Hans, the system region is CN, and the system locale is zh-Hans-CN.
536  let systemLocaleManager: i18n.SystemLocaleManager = new i18n.SystemLocaleManager();
537  let regions: string[] = ["CN", "US", "PT", "EG"];
538  let sortOptions: i18n.SortOptions = {locale: "zh-Hans-CN", isUseLocalName: false, isSuggestedFirst: true};
539  try {
540      // The country/region list after sorting is [CN, EG, US, PT].
541      let sortedRegions: Array<i18n.LocaleItem> = systemLocaleManager.getRegionInfoArray(regions, sortOptions);
542  } catch(error) {
543      let err: BusinessError = error as BusinessError;
544      console.error(`call systemLocaleManager.getRegionInfoArray failed, error code: ${err.code}, message: ${err.message}.`);
545  }
546  ```
547
548### getTimeZoneCityItemArray<sup>10+</sup>
549
550static getTimeZoneCityItemArray(): Array&lt;TimeZoneCityItem&gt;
551
552Obtains the array of time zone city items after sorting.
553
554**System API**: This is a system API.
555
556**System capability**: SystemCapability.Global.I18n
557
558**Return value**
559
560|       Type       |         Description         |
561| ----------------- | -------------------- |
562| Array&lt;[TimeZoneCityItem](#timezonecityitem10)&gt; | Array of time zone city items.|
563
564**Error codes**
565
566For details about the error codes, see [ohos.i18n Error Codes](errorcode-i18n.md) and [Universal Error Codes](../errorcode-universal.md).
567
568| ID | Error Message                  |
569| ------ | ---------------------- |
570| 202 | Permission verification failed. A non-system application calls a system API. |
571
572**Example**
573  ```ts
574  import { BusinessError } from '@kit.BasicServicesKit';
575
576  try {
577    let timeZoneCityItemArray: Array<i18n.TimeZoneCityItem> = i18n.SystemLocaleManager.getTimeZoneCityItemArray();
578    for (let i = 0; i < timeZoneCityItemArray.length; i++) {
579        console.log(timeZoneCityItemArray[i].zoneId + ", " + timeZoneCityItemArray[i].cityId + ", " + timeZoneCityItemArray[i].cityDisplayName +
580            ", " + timeZoneCityItemArray[i].offset + "\r\n");
581    }
582  } catch(error) {
583    let err: BusinessError = error as BusinessError;
584    console.error(`call SystemLocaleManager.getTimeZoneCityItemArray failed, error code: ${err.code}, message: ${err.message}.`);
585  }
586  ```
587
588## LocaleItem<sup>10+</sup>
589
590Represents the list of languages or countries/regions sorted by **SystemLocaleManager**.
591
592**System API**: This is a system API.
593
594**System capability**: SystemCapability.Global.I18n
595
596| Name           | Type           |  Mandatory  |  Description                                  |
597| --------------- | --------------- | ------ | --------------------------------------- |
598| id              | string          |   Yes  | Language code or country/region code, for example, **zh** or **CN**.   |
599| suggestionType  | [SuggestionType](#suggestiontype10)  |   Yes | Language or country/region suggestion type.                 |
600| displayName     | string          |  Yes  | Displayed name of ID in the locale of **SystemLocaleManager**.|
601| localName       | string          |  No  | Local name of the ID.                          |
602
603## TimeZoneCityItem<sup>10+</sup>
604
605Represents the time zone and city combination information.
606
607**System API**: This is a system API.
608
609**System capability**: SystemCapability.Global.I18n
610
611| Name           | Type            |  Mandatory  |  Description                                  |
612| --------------- | --------------- | ------  | --------------------------------------- |
613| zoneId          | string          |   Yes   | Time zone ID, for example, **Asia/Shanghai**.             |
614| cityId          | string          |   Yes   | City ID, for example, **Shanghai**.                  |
615| cityDisplayName | string          |   Yes   | Displayed name of the city ID in the system locale.         |
616| offset          | int             |   Yes   | Offset of the time zone ID.                        |
617| zoneDisplayName | string          |   Yes   | Displayed name of the time zone ID in the system locale.         |
618| rawOffset       | int             |   No   | Fixed offset of the time zone ID.                      |
619
620
621## SuggestionType<sup>10+</sup>
622
623Represents the language or country/region suggestion type.
624
625**System API**: This is a system API.
626
627**System capability**: SystemCapability.Global.I18n
628
629| Name                  | Value | Description  |
630| ---------------------- | ---- | ---- |
631| SUGGESTION_TYPE_NONE   | 0x00 | Not a recommended language or country/region.|
632| SUGGESTION_TYPE_RELATED| 0x01 | Country/region recommended by the system language or language recommended by the system country/region.|
633| SUGGESTION_TYPE_SIM    | 0x02 | Language recommended by the country/region of the SIM card.|
634
635
636## SortOptions<sup>10+<sup>
637
638Represents the language or country/region sorting option.
639
640**System API**: This is a system API.
641
642**System capability**: SystemCapability.Global.I18n
643
644| Name           | Type           |  Mandatory|   Description                                |
645| --------------- | --------------- | ---- | --------------------------------------- |
646| locale          | string          |  No | [Locale information](../../internationalization/i18n-locale-culture.md#how-it-works), which consists of the language, script, and country/region, for example, **zh-Hans-CN**.<br>The default value of **locale** is the system locale.   |
647| isUseLocalName  | boolean         |  No | Whether to use the local name for sorting. The value **true** means to use the local name for sorting, and the value **false** means the opposite.<br>If **getLanguageInfoArray** is called, the default value of **isUseLocalName** is **true**.<br>If **getRegionInfoArray** is called, the default value of **isUseLocalName** is **false**.               |
648| isSuggestedFirst | boolean        |  No | Whether to move the recommended language or country/region to the top in the sorting result. The value **true** means to move the recommended language or country/region to the top, and the value **false** means the opposite.<br>The default value of **isSuggestedFirst** is **true**. |
649