@@ -35,7 +35,7 @@ Obtains the localized script for the specified language.
...
@@ -35,7 +35,7 @@ Obtains the localized script for the specified language.
| string | Localized script for the specified language.|
| string | Localized script for the specified language.|
**Example**
**Example**
```
```js
i18n.getDisplayLanguage("zh","en-GB",true);
i18n.getDisplayLanguage("zh","en-GB",true);
i18n.getDisplayLanguage("zh","en-GB");
i18n.getDisplayLanguage("zh","en-GB");
```
```
...
@@ -62,7 +62,7 @@ Obtains the localized script for the specified country.
...
@@ -62,7 +62,7 @@ Obtains the localized script for the specified country.
| string | Localized script for the specified country.|
| string | Localized script for the specified country.|
**Example**
**Example**
```
```js
i18n.getDisplayCountry("zh-CN","en-GB",true);
i18n.getDisplayCountry("zh-CN","en-GB",true);
i18n.getDisplayCountry("zh-CN","en-GB");
i18n.getDisplayCountry("zh-CN","en-GB");
```
```
...
@@ -87,7 +87,7 @@ Checks whether the localized script for the specified language is displayed from
...
@@ -87,7 +87,7 @@ Checks whether the localized script for the specified language is displayed from
| boolean | Returns **true** if the localized script is displayed from right to left; returns **false** otherwise.|
| boolean | Returns **true** if the localized script is displayed from right to left; returns **false** otherwise.|
**Example**
**Example**
```
```js
i18n.isRTL("zh-CN");// Since Chinese is not written from right to left, false is returned.
i18n.isRTL("zh-CN");// Since Chinese is not written from right to left, false is returned.
i18n.isRTL("ar-EG");// Since Arabic is written from right to left, true is returned.
i18n.isRTL("ar-EG");// Since Arabic is written from right to left, true is returned.
```
```
...
@@ -107,7 +107,7 @@ Obtains the system language.
...
@@ -107,7 +107,7 @@ Obtains the system language.
| string | System language ID.|
| string | System language ID.|
**Example**
**Example**
```
```js
i18n.getSystemLanguage();
i18n.getSystemLanguage();
```
```
...
@@ -135,7 +135,7 @@ This is a system API.
...
@@ -135,7 +135,7 @@ This is a system API.
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
**Example**
**Example**
```
```js
i18n.setSystemLanguage('zh');
i18n.setSystemLanguage('zh');
```
```
...
@@ -156,7 +156,7 @@ Obtains the list of system languages.
...
@@ -156,7 +156,7 @@ Obtains the list of system languages.
| Array<string> | List of the IDs of system languages.|
| Array<string> | List of the IDs of system languages.|
**Example**
**Example**
```
```js
i18n.getSystemLanguages();
i18n.getSystemLanguages();
```
```
...
@@ -182,7 +182,7 @@ Obtains the list of countries and regions supported for the specified language.
...
@@ -182,7 +182,7 @@ Obtains the list of countries and regions supported for the specified language.
| Array<string> | List of the IDs of the countries and regions supported for the specified language.|
| Array<string> | List of the IDs of the countries and regions supported for the specified language.|
**Example**
**Example**
```
```js
i18n.getSystemCountries('zh');
i18n.getSystemCountries('zh');
```
```
...
@@ -201,7 +201,7 @@ Obtains the system region.
...
@@ -201,7 +201,7 @@ Obtains the system region.
| string | System region ID.|
| string | System region ID.|
**Example**
**Example**
```
```js
i18n.getSystemRegion();
i18n.getSystemRegion();
```
```
...
@@ -229,7 +229,7 @@ This is a system API.
...
@@ -229,7 +229,7 @@ This is a system API.
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
**Example**
**Example**
```
```js
i18n.setSystemRegion('CN');
i18n.setSystemRegion('CN');
```
```
...
@@ -248,7 +248,7 @@ Obtains the system locale.
...
@@ -248,7 +248,7 @@ Obtains the system locale.
| string | System locale ID.|
| string | System locale ID.|
**Example**
**Example**
```
```js
i18n.getSystemLocale();
i18n.getSystemLocale();
```
```
...
@@ -276,7 +276,7 @@ This is a system API.
...
@@ -276,7 +276,7 @@ This is a system API.
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
| boolean | Returns **true** if the operation is successful; returns **false** otherwise.|
**Example**
**Example**
```
```js
i18n.setSystemLocale('zh-CN');
i18n.setSystemLocale('zh-CN');
```
```
...
@@ -303,7 +303,7 @@ Checks whether the system language matches the specified region.
...
@@ -303,7 +303,7 @@ Checks whether the system language matches the specified region.
| boolean | Returns **true** if the system language matches the specified region; returns **false** otherwise.|
| boolean | Returns **true** if the system language matches the specified region; returns **false** otherwise.|
**Example**
**Example**
```
```js
i18n.isSuggested('zh','CN');
i18n.isSuggested('zh','CN');
```
```
...
@@ -328,7 +328,7 @@ Obtains a **Calendar** object.
...
@@ -328,7 +328,7 @@ Obtains a **Calendar** object.
| [Calendar](#calendar8) | **Calendar** object.|
| [Calendar](#calendar8) | **Calendar** object.|
**Example**
**Example**
```
```js
i18n.getCalendar("zh-Hans","gregory");
i18n.getCalendar("zh-Hans","gregory");
```
```
...
@@ -350,7 +350,7 @@ Sets the date for this **Calendar** object.
...
@@ -350,7 +350,7 @@ Sets the date for this **Calendar** object.
| date | Date | Yes | Date to be set for the **Calendar** object.|
| date | Date | Yes | Date to be set for the **Calendar** object.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("en-US","gregory");
varcalendar=i18n.getCalendar("en-US","gregory");
vardate=newDate(2021,10,7,8,0,0,0);
vardate=newDate(2021,10,7,8,0,0,0);
calendar.setTime(date);
calendar.setTime(date);
...
@@ -371,7 +371,7 @@ Sets the date and time for this **Calendar** object. The value is represented by
...
@@ -371,7 +371,7 @@ Sets the date and time for this **Calendar** object. The value is represented by
| time | number | Yes | Number of milliseconds that have elapsed since the Unix epoch.|
| time | number | Yes | Number of milliseconds that have elapsed since the Unix epoch.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("en-US","gregory");
varcalendar=i18n.getCalendar("en-US","gregory");
calendar.setTime(10540800000);
calendar.setTime(10540800000);
```
```
...
@@ -396,7 +396,7 @@ Sets the year, month, day, hour, minute, and second for this **Calendar** object
...
@@ -396,7 +396,7 @@ Sets the year, month, day, hour, minute, and second for this **Calendar** object
| second | number | No | Second to set. |
| second | number | No | Second to set. |
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.set(2021,10,1,8,0,0);// set time to 2021.10.1 08:00:00
calendar.set(2021,10,1,8,0,0);// set time to 2021.10.1 08:00:00
```
```
...
@@ -416,7 +416,7 @@ Sets the time zone of this **Calendar** object.
...
@@ -416,7 +416,7 @@ Sets the time zone of this **Calendar** object.
| timezone | string | Yes | Time zone, for example, **Asia/Shanghai**.|
| timezone | string | Yes | Time zone, for example, **Asia/Shanghai**.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.setTimeZone("Asia/Shanghai");
calendar.setTimeZone("Asia/Shanghai");
```
```
...
@@ -436,7 +436,7 @@ Obtains the time zone of this **Calendar** object.
...
@@ -436,7 +436,7 @@ Obtains the time zone of this **Calendar** object.
| string | Time zone of the **Calendar** object.|
| string | Time zone of the **Calendar** object.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.setTimeZone("Asia/Shanghai");
calendar.setTimeZone("Asia/Shanghai");
calendar.getTimeZone();// Asia/Shanghai"
calendar.getTimeZone();// Asia/Shanghai"
...
@@ -457,7 +457,7 @@ Obtains the start day of a week for this **Calendar** object.
...
@@ -457,7 +457,7 @@ Obtains the start day of a week for this **Calendar** object.
| number | Start day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.|
| number | Start day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("en-US","gregory");
varcalendar=i18n.getCalendar("en-US","gregory");
calendar.getFirstDayOfWeek();
calendar.getFirstDayOfWeek();
```
```
...
@@ -477,7 +477,7 @@ Sets the start day of a week for this **Calendar** object.
...
@@ -477,7 +477,7 @@ Sets the start day of a week for this **Calendar** object.
| value | number | No | Start day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.|
| value | number | No | Start day of a week. The value **1** indicates Sunday, and the value **7** indicates Saturday.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.setFirstDayOfWeek(0);
calendar.setFirstDayOfWeek(0);
```
```
...
@@ -497,7 +497,7 @@ Obtains the minimum number of days in the first week of a year.
...
@@ -497,7 +497,7 @@ Obtains the minimum number of days in the first week of a year.
| number | Minimum number of days in the first week of a year.|
| number | Minimum number of days in the first week of a year.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.getMinimalDaysInFirstWeek();
calendar.getMinimalDaysInFirstWeek();
```
```
...
@@ -517,7 +517,7 @@ Sets the minimum number of days in the first week of a year.
...
@@ -517,7 +517,7 @@ Sets the minimum number of days in the first week of a year.
| value | number | No | Minimum number of days in the first week of a year.|
| value | number | No | Minimum number of days in the first week of a year.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.setMinimalDaysInFirstWeek(3);
calendar.setMinimalDaysInFirstWeek(3);
```
```
...
@@ -542,7 +542,7 @@ Obtains the value of the specified field in the **Calendar** object.
...
@@ -542,7 +542,7 @@ Obtains the value of the specified field in the **Calendar** object.
| number | Value of the specified field. For example, if the year in the internal date of this **Calendar** object is **1990**, the **get("year")** function will return **1990**.|
| number | Value of the specified field. For example, if the year in the internal date of this **Calendar** object is **1990**, the **get("year")** function will return **1990**.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.set(2021,10,1,8,0,0);// set time to 2021.10.1 08:00:00
calendar.set(2021,10,1,8,0,0);// set time to 2021.10.1 08:00:00
calendar.get("hour_of_day");// 8
calendar.get("hour_of_day");// 8
...
@@ -568,7 +568,7 @@ Obtains the name of the **Calendar** object displayed for the specified locale.
...
@@ -568,7 +568,7 @@ Obtains the name of the **Calendar** object displayed for the specified locale.
| string | Name of the **Calendar** object displayed for the specified locale.|
| string | Name of the **Calendar** object displayed for the specified locale.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("en-US","buddhist");
varcalendar=i18n.getCalendar("en-US","buddhist");
calendar.getDisplayName("zh");// Obtain the name of the Buddhist calendar in zh.
calendar.getDisplayName("zh");// Obtain the name of the Buddhist calendar in zh.
```
```
...
@@ -593,7 +593,7 @@ Checks whether the specified date in this **Calendar** object is a weekend.
...
@@ -593,7 +593,7 @@ Checks whether the specified date in this **Calendar** object is a weekend.
| boolean | Returns **true** if the date is a weekend; returns **false** if the date is a weekday.|
| boolean | Returns **true** if the date is a weekend; returns **false** if the date is a weekday.|
**Example**
**Example**
```
```js
varcalendar=i18n.getCalendar("zh-Hans");
varcalendar=i18n.getCalendar("zh-Hans");
calendar.set(2021,11,11,8,0,0);// set time to 2021.11.11 08:00:00
calendar.set(2021,11,11,8,0,0);// set time to 2021.11.11 08:00:00
calendar.isWeekend();// false
calendar.isWeekend();// false
...
@@ -620,7 +620,7 @@ Parameters
...
@@ -620,7 +620,7 @@ Parameters
| options | [PhoneNumberFormatOptions](#phonenumberformatoptions8) | No | Options of the **PhoneNumberFormat** object. |
| options | [PhoneNumberFormatOptions](#phonenumberformatoptions8) | No | Options of the **PhoneNumberFormat** object. |
@@ -1084,7 +1083,7 @@ Obtains the type of the input character string.
...
@@ -1084,7 +1083,7 @@ Obtains the type of the input character string.
| string | Type of the input character.|
| string | Type of the input character.|
**Example**
**Example**
```
```js
vartype=i18n.Character.getType("a");
vartype=i18n.Character.getType("a");
```
```
...
@@ -1108,7 +1107,7 @@ Obtains a [BreakIterator](#breakiterator8) object for text segmentation.
...
@@ -1108,7 +1107,7 @@ Obtains a [BreakIterator](#breakiterator8) object for text segmentation.
| [BreakIterator](#breakiterator8) | [BreakIterator](#breakiterator8) object used for text segmentation.|
| [BreakIterator](#breakiterator8) | [BreakIterator](#breakiterator8) object used for text segmentation.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
```
```
...
@@ -1130,7 +1129,7 @@ Sets the text to be processed by the [BreakIterator](#breakiterator8) object.
...
@@ -1130,7 +1129,7 @@ Sets the text to be processed by the [BreakIterator](#breakiterator8) object.
| text | string | Yes | Text to be processed by the **BreakIterator** object.|
| text | string | Yes | Text to be processed by the **BreakIterator** object.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
```
```
...
@@ -1150,7 +1149,7 @@ Obtains the text being processed by the [BreakIterator](#breakiterator8) object.
...
@@ -1150,7 +1149,7 @@ Obtains the text being processed by the [BreakIterator](#breakiterator8) object.
| string | Text being processed by the **BreakIterator** object.|
| string | Text being processed by the **BreakIterator** object.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.getLineBreakText();// Apple is my favorite fruit.
iterator.getLineBreakText();// Apple is my favorite fruit.
...
@@ -1171,7 +1170,7 @@ Obtains the position of the [BreakIterator](#breakiterator8) object in the text
...
@@ -1171,7 +1170,7 @@ Obtains the position of the [BreakIterator](#breakiterator8) object in the text
| number | Position of the **BreakIterator** object in the text being processed.|
| number | Position of the **BreakIterator** object in the text being processed.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.current();// 0
iterator.current();// 0
...
@@ -1192,7 +1191,7 @@ Puts the [BreakIterator](#breakiterator8) object to the first text boundary, whi
...
@@ -1192,7 +1191,7 @@ Puts the [BreakIterator](#breakiterator8) object to the first text boundary, whi
| number | Offset to the first text boundary of the processed text.|
| number | Offset to the first text boundary of the processed text.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.first();// 0
iterator.first();// 0
...
@@ -1213,7 +1212,7 @@ Puts the [BreakIterator](#breakiterator8) object to the last text boundary, whic
...
@@ -1213,7 +1212,7 @@ Puts the [BreakIterator](#breakiterator8) object to the last text boundary, whic
| number | Offset of the last text boundary of the processed text.|
| number | Offset of the last text boundary of the processed text.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.last();// 27
iterator.last();// 27
...
@@ -1239,7 +1238,7 @@ Moves the [BreakIterator](#breakiterator8) object backward by the specified numb
...
@@ -1239,7 +1238,7 @@ Moves the [BreakIterator](#breakiterator8) object backward by the specified numb
| number | Position of the [BreakIterator](#breakiterator8) object in the text after it is moved by the specified number of text boundaries. The value **-1** is returned if the position of the [BreakIterator](#breakiterator8) object is outside of the processed text after it is moved by the specified number of text boundaries.|
| number | Position of the [BreakIterator](#breakiterator8) object in the text after it is moved by the specified number of text boundaries. The value **-1** is returned if the position of the [BreakIterator](#breakiterator8) object is outside of the processed text after it is moved by the specified number of text boundaries.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.first();// 0
iterator.first();// 0
...
@@ -1262,7 +1261,7 @@ Moves the [BreakIterator](#breakiterator8) object to the previous text boundary.
...
@@ -1262,7 +1261,7 @@ Moves the [BreakIterator](#breakiterator8) object to the previous text boundary.
| number | Position of the [BreakIterator](#breakiterator8) object in the text after it is moved to the previous text boundary. The value **-1** is returned if the position of the [BreakIterator](#breakiterator8) object is outside of the processed text after it is moved by the specified number of text boundaries.|
| number | Position of the [BreakIterator](#breakiterator8) object in the text after it is moved to the previous text boundary. The value **-1** is returned if the position of the [BreakIterator](#breakiterator8) object is outside of the processed text after it is moved by the specified number of text boundaries.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.first();// 0
iterator.first();// 0
...
@@ -1290,7 +1289,7 @@ Moves the [BreakIterator](#breakiterator8) object to the text boundary after the
...
@@ -1290,7 +1289,7 @@ Moves the [BreakIterator](#breakiterator8) object to the text boundary after the
| number | The value **-1** is returned if the text boundary to which the [BreakIterator](#breakiterator8) object is moved is outside of the processed text.|
| number | The value **-1** is returned if the text boundary to which the [BreakIterator](#breakiterator8) object is moved is outside of the processed text.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.following(0);// 6
iterator.following(0);// 6
...
@@ -1318,7 +1317,7 @@ Checks whether the position specified by the offset is a text boundary. If **tru
...
@@ -1318,7 +1317,7 @@ Checks whether the position specified by the offset is a text boundary. If **tru
| boolean | Returns **true** if the position specified by the offset is a text boundary; returns **false** otherwise.|
| boolean | Returns **true** if the position specified by the offset is a text boundary; returns **false** otherwise.|
**Example**
**Example**
```
```js
variterator=i18n.getLineInstance("en");
variterator=i18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.setLineBreakText("Apple is my favorite fruit.");
iterator.isBoundary(0);// true;
iterator.isBoundary(0);// true;
...
@@ -1340,7 +1339,7 @@ Checks whether the 24-hour clock is used.
...
@@ -1340,7 +1339,7 @@ Checks whether the 24-hour clock is used.
| boolean | Returns **true** if the 24-hour clock is used; returns **false** otherwise.|
| boolean | Returns **true** if the 24-hour clock is used; returns **false** otherwise.|
**Example**
**Example**
```
```js
varis24HourClock=i18n.is24HourClock();
varis24HourClock=i18n.is24HourClock();
```
```
...
@@ -1366,7 +1365,7 @@ Sets the 24-hour clock.
...
@@ -1366,7 +1365,7 @@ Sets the 24-hour clock.
| boolean | Returns **true** if the 24-hour clock is enabled; returns **false** otherwise.|
| boolean | Returns **true** if the 24-hour clock is enabled; returns **false** otherwise.|
**Example**
**Example**
```
```js
// Set the system time to the 24-hour clock.
// Set the system time to the 24-hour clock.
varsuccess=i18n.set24HourClock(true);
varsuccess=i18n.set24HourClock(true);
```
```
...
@@ -1394,7 +1393,7 @@ Adds a preferred language to the specified position on the preferred language li
...
@@ -1394,7 +1393,7 @@ Adds a preferred language to the specified position on the preferred language li
| boolean | Returns **true** if the preferred language is successfully added; returns **false** otherwise.|
| boolean | Returns **true** if the preferred language is successfully added; returns **false** otherwise.|
**Example**
**Example**
```
```js
// Add zh-CN to the preferred language list.
// Add zh-CN to the preferred language list.
varlanguage='zh-CN';
varlanguage='zh-CN';
varindex=0;
varindex=0;
...
@@ -1423,7 +1422,7 @@ Deletes a preferred language from the specified position on the preferred langua
...
@@ -1423,7 +1422,7 @@ Deletes a preferred language from the specified position on the preferred langua
| boolean | Returns **true** if the preferred language is deleted; returns **false** otherwise.|
| boolean | Returns **true** if the preferred language is deleted; returns **false** otherwise.|
**Example**
**Example**
```
```js
// Delete the first preferred language from the preferred language list.
// Delete the first preferred language from the preferred language list.
varindex=0;
varindex=0;
varsuccess=i18n.removePreferredLanguage(index);
varsuccess=i18n.removePreferredLanguage(index);
...
@@ -1444,7 +1443,7 @@ Obtains the list of preferred languages.
...
@@ -1444,7 +1443,7 @@ Obtains the list of preferred languages.
| Array<string> | List of preferred languages.|
| Array<string> | List of preferred languages.|
| boolean | Result indicating whether the local digit switch is successfully set. The value **true** indicates that the local digit switch is successfully set, and the value **false** indicates the opposite.|
| boolean | Result indicating whether the local digit switch is successfully set. The value **true** indicates that the local digit switch is successfully set, and the value **false** indicates the opposite.|
**Example**
**Example**
```
```js
varstatus=i18n.setUsingLocalDigit(true);
varstatus=i18n.setUsingLocalDigit(true);
```
```
...
@@ -1727,7 +1726,7 @@ Checks whether the local digit switch is turned on.
...
@@ -1727,7 +1726,7 @@ Checks whether the local digit switch is turned on.
| boolean | Result indicating whether the local digit switch is turned on. The value **true** indicates that the local digit switch is turned on, and the value **false** indicates the opposite.|
| boolean | Result indicating whether the local digit switch is turned on. The value **true** indicates that the local digit switch is turned on, and the value **false** indicates the opposite.|
| type | string | Yes| Type of the key input event to listen for. Only **key** is supported.|
| type | string | Yes| Type of the key input event to listen for. Only **key** is supported.|
| keyOptions | [keyOptions](#keyOptions) | Yes| Key option, which specifies the condition for combination key input.|
| keyOptions | [keyOptions](#keyoptions) | Yes| Key option, which specifies the condition for combination key input.|
| callback | Callback<KeyOptions> | Yes| Callback used to return the result.<br> When a key input event that meets the specified options occurs, **keyOptions** will be passed as an input parameter to **callback**.|
| callback | Callback<KeyOptions> | Yes| Callback used to return the result.<br> When a key input event that meets the specified options occurs, **keyOptions** will be passed as an input parameter to **callback**.|
**Example**
**Example**
...
@@ -62,7 +62,7 @@ This is a system API.
...
@@ -62,7 +62,7 @@ This is a system API.
| Name| Type| Mandatory| Description|
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the key input event to listen for. Only **key** is supported.|
| type | string | Yes| Type of the key input event to listen for. Only **key** is supported.|
| keyOptions | [keyOptions](#keyOptions) | Yes| Key options passed to the key input event when listening starts.|
| keyOptions | [keyOptions](#keyoptions) | Yes| Key options passed to the key input event when listening starts.|
| callback | Callback<KeyOptions> | Yes| Callback function passed to the key input event with **keyOptions** when listening starts.|
| callback | Callback<KeyOptions> | Yes| Callback function passed to the key input event with **keyOptions** when listening starts.|
The Input Device module implements listening for connection, disconnection, and update events of input devices and displays information about input devices. For example, it can be used to listen for mouse insertion and removal and obtain information such as the ID, name, and pointer speed of the mouse.
The Input Device module implements listening for connection, disconnection, and update events of input devices and displays information about input devices. For example, it can be used to listen for mouse insertion and removal and obtain information such as the ID, name, and pointer speed of the mouse.
> **NOTE**<br>
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...
@@ -28,7 +29,7 @@ Enables listening for hot swap events of an input device.
...
@@ -28,7 +29,7 @@ Enables listening for hot swap events of an input device.
@@ -126,7 +126,7 @@ Switches to another input method. This API uses a promise to return the result.
...
@@ -126,7 +126,7 @@ Switches to another input method. This API uses a promise to return the result.
```
```
## InputMethodController
## InputMethodController
In the following API examples, you must first use **[getInputMethodController](#inputmethodgetinputmethodcontroller)** to obtain an **InputMethodController** instance, and then call the APIs using the obtained instance.
In the following API examples, you must first use [getInputMethodController](#inputmethodgetinputmethodcontroller) to obtain an **InputMethodController** instance, and then call the APIs using the obtained instance.
### stopInput
### stopInput
...
@@ -174,7 +174,7 @@ Hides the keyboard. This API uses an asynchronous callback to return the result.
...
@@ -174,7 +174,7 @@ Hides the keyboard. This API uses an asynchronous callback to return the result.
## InputMethodSetting<sup>8+</sup>
## InputMethodSetting<sup>8+</sup>
In the following API examples, you must first use **[getInputMethodSetting](#inputmethodgetinputmethodcontroller)** to obtain an **InputMethodSetting** instance, and then call the APIs using the obtained instance.
In the following API examples, you must first use [getInputMethodSetting](#inputmethodgetinputmethodcontroller) to obtain an **InputMethodSetting** instance, and then call the APIs using the obtained instance.
@@ -7,7 +7,7 @@ There are two types of updates: SD card update and over the air (OTA) update.
...
@@ -7,7 +7,7 @@ There are two types of updates: SD card update and over the air (OTA) update.
- The SD card update depends on the update packages and SD cards.
- The SD card update depends on the update packages and SD cards.
- The OTA update depends on the server deployed by the device manufacturer for managing update packages. The OTA server IP address is passed by the caller. The request interface is fixed and developed by the device manufacturer.
- The OTA update depends on the server deployed by the device manufacturer for managing update packages. The OTA server IP address is passed by the caller. The request interface is fixed and developed by the device manufacturer.
> **NOTE**
> **Note:**
>
>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
>
...
@@ -29,9 +29,9 @@ Obtains an **OnlineUpdater** object.
...
@@ -29,9 +29,9 @@ Obtains an **OnlineUpdater** object.
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
**Example**
**Example**
```
```ts
// Version digest information
// Version digest information
varversionDigestInfo={
varversionDigestInfo={
versionDigest:"versionDigest"// Version digest information in the check result
versionDigest:"versionDigest"// Version digest information in the check result
...
@@ -515,20 +515,20 @@ Downloads the new version. This API uses a promise to return the result.
...
@@ -515,20 +515,20 @@ Downloads the new version. This API uses a promise to return the result.
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
**Example**
**Example**
```
```ts
// Version digest information
// Version digest information
varversionDigestInfo={
varversionDigestInfo={
versionDigest:"versionDigest"// Version digest information in the check result
versionDigest:"versionDigest"// Version digest information in the check result
...
@@ -593,20 +593,20 @@ Resumes download of the new version. This API uses a promise to return the resul
...
@@ -593,20 +593,20 @@ Resumes download of the new version. This API uses a promise to return the resul
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
**Example**
**Example**
```
```ts
// Version digest information
// Version digest information
varversionDigestInfo={
varversionDigestInfo={
versionDigest:"versionDigest"// Version digest information in the check result
versionDigest:"versionDigest"// Version digest information in the check result
...
@@ -670,20 +670,20 @@ Resumes download of the new version. This API uses a promise to return the resul
...
@@ -670,20 +670,20 @@ Resumes download of the new version. This API uses a promise to return the resul
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
**Example**
**Example**
```
```ts
// Version digest information
// Version digest information
varversionDigestInfo={
varversionDigestInfo={
versionDigest:"versionDigest"// Version digest information in the check result
versionDigest:"versionDigest"// Version digest information in the check result
...
@@ -747,20 +747,20 @@ Updates the version. This API uses a promise to return the result.
...
@@ -747,20 +747,20 @@ Updates the version. This API uses a promise to return the result.
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
**Example**
**Example**
```
```ts
// Version digest information
// Version digest information
varversionDigestInfo={
varversionDigestInfo={
versionDigest:"versionDigest"// Version digest information in the check result
versionDigest:"versionDigest"// Version digest information in the check result
...
@@ -824,20 +824,20 @@ Clears errors. This API uses a promise to return the result.
...
@@ -824,20 +824,20 @@ Clears errors. This API uses a promise to return the result.
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
| callback | AsyncCallback\<void> | Yes | Callback invoked to return the result. If the operation is successful, `err` is `undefined`; otherwise, `err` is an `Error` object.|
**Example**
**Example**
```
```ts
varupgradeFiles=[{
varupgradeFiles=[{
fileType:update.ComponentType.OTA,// OTA package
fileType:update.ComponentType.OTA,// OTA package
filePath:"path"// Path of the local update package
filePath:"path"// Path of the local update package
...
@@ -1241,13 +1241,13 @@ Installs the update package. This API uses a promise to return the result.
...
@@ -1241,13 +1241,13 @@ Installs the update package. This API uses a promise to return the result.