globalization.md 3.5 KB
Newer Older
M
mamingshuai 已提交
1
# Globalization<a name="EN-US_TOPIC_0000001115837954"></a>
L
liudongmiao 已提交
2

M
mamingshuai 已提交
3
## Introduction<a name="section11660541593"></a>
L
liudongmiao 已提交
4

M
mamingshuai 已提交
5
If OpenHarmony devices and applications need to be used globally, they must meet the requirements of users in different regions on languages and cultures. The Globalization subsystem provides the multi-language and multi-cultural capabilities for global use, including:
L
liudongmiao 已提交
6

M
mamingshuai 已提交
7
-   **Resource management**
L
liudongmiao 已提交
8

M
mamingshuai 已提交
9
    The subsystem loads, parses, and initializes system and application resources based on device types and system configurations, and provides APIs for obtaining resources such as character strings and media files.
L
liudongmiao 已提交
10

M
mamingshuai 已提交
11
-   **Internationalization \(i18n\)**
L
liudongmiao 已提交
12

M
mamingshuai 已提交
13
    The subsystem provides the bottom-layer resource backtracking capabilities, with a wide array of i18n APIs for implementing functions such as date/time formatting, number formatting, phone number formatting, and singular-plural formatting.
L
liudongmiao 已提交
14 15


M
mamingshuai 已提交
16
## Architecture<a name="section1558604311012"></a>
L
liudongmiao 已提交
17

M
mamingshuai 已提交
18
**Figure  1**  Architecture of the globalization subsystem<a name="fig1687592425010"></a>
L
liudongmiao 已提交
19 20


M
mamingshuai 已提交
21
![](figures/architecture-of-the-globalization-subsystem.png "architecture-of-the-globalization-subsystem")
L
liudongmiao 已提交
22

M
mamingshuai 已提交
23
## Directory Structure<a name="section161941989596"></a>
L
liudongmiao 已提交
24

M
mamingshuai 已提交
25
The source code of the Globalization subsystem is stored in the  **/base/global**  directory.
L
liudongmiao 已提交
26

M
mamingshuai 已提交
27
The directory structure of the Globalization subsystem for the mini and small systems is as follows:
L
liudongmiao 已提交
28 29 30

```
/base/global/
M
mamingshuai 已提交
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
├── i18n_lite               # Code repository for the i18n framework
│   ├── frameworks          # Core code of the i18n framework
│   │   ├── i18n            # i18n module
│   │   │   ├── include     # Header files
│   │   │   ├── src         # Implementation code
│   │   │   └── test        # Test code
│   ├── interfaces          # APIs
│   │   ├── kits            # Application APIs
│   │   │   ├── i18n        # C/C++ i18n APIs
│   │   │   └── js          # C/C++ support for JavaScript APIs
├── resmgr_lite             # Code repository for the Resmgr framework
│   ├── frameworks          # Core code of the Resmgr framework
│   │   ├── resmgr          # Resource parsing code
│   │   │   ├── include     # Header files
│   │   │   └── src         # Implementation code
│   ├── interfaces          # APIs
│   │   └── innerkits       # APIs for internal subsystems
L
liudongmiao 已提交
48 49
```

M
mamingshuai 已提交
50
The directory structure of the Globalization subsystem for the standard system is as follows:
L
liudongmiao 已提交
51

M
mamingshuai 已提交
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
```
/base/global
├── i18n_standard           # Code repository for the i18n framework
│   ├── frameworks          # Core code of the i18n framework
│   ├── interfaces          # APIs
│   │   ├── js              # JavaScript APIs
│   │   └── native          # Native APIs
├── resmgr_standard         # Code repository for the Resmgr module
│   ├── frameworks          # Core code
│   │   ├── resmgr          # Resource parsing code
│   │   │   ├── include     # Header files
│   │   │   ├── src         # Implementation code
│   │   │   └── test        # Test code
│   ├── interfaces          # APIs
│   │   ├── innerkits       # APIs for internal subsystems
│   │   └── js              # JavaScript APIs
```

## Repositories Involved<a name="section1371113476307"></a>

**Globalization subsystem**
L
liudongmiao 已提交
73

M
mamingshuai 已提交
74
global\_i18n\_lite
L
liudongmiao 已提交
75

M
mamingshuai 已提交
76
global\_i18n\_standard
L
liudongmiao 已提交
77

M
mamingshuai 已提交
78
global\_resmgr\_lite
L
liudongmiao 已提交
79

M
mamingshuai 已提交
80
global\_resmgr\_standard
L
liudongmiao 已提交
81