未验证 提交 08e03aea 编写于 作者: O openharmony_ci 提交者: Gitee

!15859 修改国际化模块示例代码

Merge pull request !15859 from sunyaozu/cherry-pick-1678438076
......@@ -1194,7 +1194,7 @@ getInstance(locale?:string): IndexUtil
**示例:**
```js
let indexUtil= I18n.getInstance("zh-CN");
let indexUtil = I18n.getInstance("zh-CN");
```
......@@ -1267,7 +1267,7 @@ getIndex(text: string): string
**示例:**
```js
let indexUtil= I18n.getInstance("zh-CN");
let indexUtil = I18n.getInstance("zh-CN");
let index = indexUtil.getIndex("hi"); // index = "H"
```
......@@ -1382,7 +1382,7 @@ first(): number
**示例:**
```js
let iterator = i18n.getLineInstance("en");
let iterator = I18n.getLineInstance("en");
iterator.setLineBreakText("Apple is my favorite fruit.");
let firstPos = iterator.first(); // firstPos = 0
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册