| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| AppScope/ | 22-Oct-2025 | - | 35 | 32 | ||
| entry/ | 22-Oct-2025 | - | 1,945 | 1,794 | ||
| hvigor/ | 22-Oct-2025 | - | 7 | 7 | ||
| sceenshots/ | 22-Oct-2025 | - | ||||
| .gitignore | D | 22-Oct-2025 | 156 | 13 | 13 | |
| README_zh.md | D | 22-Oct-2025 | 3.2 KiB | 65 | 48 | |
| build-profile.json5 | D | 22-Oct-2025 | 1.1 KiB | 43 | 42 | |
| hvigorfile.ts | D | 22-Oct-2025 | 764 | 17 | 1 | |
| hvigorw | D | 22-Oct-2025 | 2 KiB | 62 | 28 | |
| hvigorw.bat | D | 22-Oct-2025 | 2 KiB | 71 | 55 | |
| oh-package.json5 | D | 22-Oct-2025 | 864 | 28 | 26 | |
| ohosTest.md | D | 22-Oct-2025 | 1.9 KiB | 17 | 12 |
README_zh.md
1# 国际化 2 3### 介绍 4 5本示例主要展示了国际化模块的相关功能,使用[@ohos.i18n](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-localization-kit/js-apis-i18n.md) 6接口,实现简单日历展示、字符类型判断、文本断点处理功能。 7 8### 效果预览 9 10| 首页 | 日历 | 字符、文本处理 | 11|-------------------------------|---------------------------------------|-------------------------------------------------------| 12|  |  |  | 13 14使用说明 151. 在主界面,可以点击日历、字符文本处理按钮进入对应功能界面; 162. 在日历界面,点击“<” “>”按钮,可以查看上/下月公历信息; 173. 在字符、文本处理界面,上方输入框输入一个字符,点击字符类型判断可以查看当前输入的字符类型,下方输入框输入长文本,点击文本断点可以查看文本断点结果,断点处用红色/标记; 18 19### 工程目录 20 21``` 22entry/src/main/ets/ 23|---component 24| |---OperationView.ets // 主页item组件 25| |---TitleBar.ets // TitleBar组件 26|---entryability 27|---pages 28| |---Calendar.ets // 日历页面 29| |---Index.ets // 首页 30| |---TextProcessing.ets // 字符、文本断点处理页面 31|---util 32| |---Logger.ets // log工具 33| |---ResourceUtil.ts // 资源管理工具 34``` 35 36### 具体实现 371. 日历功能使用[@ohos.i18n](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-localization-kit/js-apis-i18n.md)模块中Calendar实现,全部逻辑处于Calendar,源码参考:[Calendar.ets](entry/src/main/ets/pages/Calendar.ets)。 382. 字符类型判断功能使用[@ohos.i18n](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-localization-kit/js-apis-i18n.md)模块中Unicode实现,全部逻辑处于TextProcessing,源码参考:[TextProcessing.ets](entry/src/main/ets/pages/TextProcessing.ets)。 393. 文本断点功能使用[@ohos.i18n](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/reference/apis-localization-kit/js-apis-i18n.md)模块中breakIterator实现,全部逻辑处于TextProcessing,源码参考:[TextProcessing.ets](entry/src/main/ets/pages/TextProcessing.ets)。 40 41### 相关权限 42 43不涉及 44 45### 依赖 46 47不涉及 48 49### 约束与限制 50 511. 本示例仅支持标准系统上运行,支持设备:RK3568; 522. 本示例已适配API version 10版本SDK,版本号:4.0.10.11,镜像版本号:OpenHarmony 4.0.10.13; 533. 本示例需要使用DevEco Studio 4.0 Release (Build Version: 4.0.0.600, built on October 17, 2023)及以上版本才可编译运行; 54 55### 下载 56 57如需单独下载本工程,执行如下命令: 58``` 59git init 60git config core.sparsecheckout true 61echo code/BasicFeature/International/International/ > .git/info/sparse-checkout 62git remote add origin https://gitee.com/openharmony/applications_app_samples.git 63git pull origin master 64 65```