1# Globalization Subsystem ChangeLog
2
3## cl.global.1 Runtime Authentication Added for System APIs
4
5The internationalization component of the globalization subsystem adds runtime authentication for system APIs in certain scenarios. The following changes are made in API version 9 and later:
6 - Setting the system language, country or region, and area
7 - Setting the 24-hour format of the system
8 - Adding and removing the preferred language
9 - Setting localized numbers
10
11You need to adapt your application based on the following information.
12
13**Change Impacts**
14
15APIs involved in the preceding scenarios can be properly called only by system applications that have the **UPDATE_CONFIGURATION** permission.
16
17**Key API/Component Changes**
18
19 - Involved APIs:
20   - setSystemLanguage(language: string): void;
21   - setSystemRegion(region: string): void;
22   - setSystemLocale(locale: string): void;
23   - set24HourClock(option: boolean): void;
24   - addPreferredLanguage(language: string, index?: number): void;
25   - removePreferredLanguage(index: number): void;
26   - setUsingLocalDigit(flag: boolean): void;
27
28**Adaptation Guide**
29
30Make sure the application trying to call any of the above APIs is a system application. Non-system applications are not allowed to call the APIs.
31An exception will be thrown upon lack of a necessary permission or a call request from a non-system application. The exception can be captured via **try-catch**.
32
33```js
34import I18n from '@ohos.i18n'
35
36try {
37  I18n.System.setSystemLanguage('zh');
38} catch(error) {
39  console.error(`call System.setSystemLanguage failed, error code: ${error.code}, message: ${error.message}.`)
40}
41```
42