Skip to content

Commit a2dee57

Browse files
committed
增加国际化说明
1 parent 2cd1c9b commit a2dee57

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,13 @@ _XUpdate.startInstallApk(getContext(), FileUtils.getFileByPath(PathUtils.getFile
543543

544544
If your APK installation is different, you can implement your own APK installer. You only need to implement the `OnInstallListener` interface and use the `XUpdate.setOnInstallListener` set it to take effect.
545545

546+
### 3.10、International
547+
548+
Due to the limited level of the author, only Chinese and English are supported【the default language is English】. If you need to support other languages, you only need to create a new corresponding language file under the `res` of your own project to translate in multiple languages.
549+
550+
Please refer to ***[xupdate_strings.xml](https://github.com/xuexiangjys/XUpdate/blob/master/xupdate-lib/src/main/res/values-zh-rCN/xupdate_strings.xml)***
551+
552+
What? You don't know Android's multilingual configuration yet? I suggest you take a look at this article:[Android项目国际化多国语言适配](https://blog.csdn.net/qq_29769851/article/details/90606437)
546553

547554
## Proguard
548555

@@ -583,6 +590,9 @@ Name | Money | Platform
583590
:-|:-|:-
584591
*天 | 100¥ | WeChat
585592
*航 | 10¥ | Alipay
593+
X*? | 18.88¥ | WeChat
594+
*网 | 1¥ | WeChat
595+
Joe | 88.88¥ | WeChat
586596

587597
## WeChat Subscription
588598

README_ZH.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,13 @@ _XUpdate.startInstallApk(getContext(), FileUtils.getFileByPath(PathUtils.getFile
539539

540540
如果你的apk安装与众不同,你可以实现自己的apk安装器。你只需要实现OnInstallListener接口,并通过`XUpdate.setOnInstallListener`进行设置即可生效。
541541

542+
### 3.10、国际化配置
543+
544+
由于作者水平有限, 目前只支持中文和英文两种语言的显示【默认语言是英语】。需要支持其他语言的,只需要在自己项目的`res`下新建对应的语言文件,进行多语言的翻译即可。
545+
546+
需要翻译的详细内容参见 ***[xupdate_strings.xml](https://github.com/xuexiangjys/XUpdate/blob/master/xupdate-lib/src/main/res/values-zh-rCN/xupdate_strings.xml)*** 文件。
547+
548+
什么?你还不会Android的多语言配置?建议你看一下这篇文章:[Android项目国际化多国语言适配](https://blog.csdn.net/qq_29769851/article/details/90606437)
542549

543550
## 混淆配置
544551

@@ -579,6 +586,9 @@ https://github.com/WVector/AppUpdate
579586
:-|:-|:-
580587
*天 | 100¥ | 微信
581588
*航 | 10¥ | 支付宝
589+
X*? | 18.88¥ | 微信
590+
*网 | 1¥ | 微信
591+
Joe | 88.88¥ | 微信
582592

583593
## 公众号
584594

xupdate-lib/src/main/res/values-en-rUS/xupdate_strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
-->
1717

1818
<resources>
19+
<!-- Update the content used in the interface, which needs to be configured for the internationalization of the interface -->
1920
<string name="xupdate_lab_update">Upgrade</string>
2021
<string name="xupdate_lab_background_update">Background Upgrade</string>
2122
<string name="xupdate_lab_install">Install</string>
@@ -29,6 +30,7 @@
2930
<string name="xupdate_lab_downloading">Downloading:</string>
3031
<string name="xupdate_tip_download_url_error">New version download path error</string>
3132

33+
<!-- Update error message -->
3234
<string name="xupdate_error_install_failed">Failed to install APK!</string>
3335
<string name="xupdate_error_download_permission_denied">Unable to download: storage permission request rejected!</string>
3436
<string name="xupdate_error_download_failed">Download failed!</string>

xupdate-lib/src/main/res/values-zh-rCN/xupdate_strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
-->
1717

1818
<resources>
19+
<!-- 更新界面使用到的内容,界面国际化需要配置这些内容 -->
1920
<string name="xupdate_lab_update">升级</string>
2021
<string name="xupdate_lab_background_update">后台更新</string>
2122
<string name="xupdate_lab_install">安装</string>
@@ -29,6 +30,7 @@
2930
<string name="xupdate_lab_downloading">正在下载:</string>
3031
<string name="xupdate_tip_download_url_error">新版本下载路径错误</string>
3132

33+
<!-- 更新错误信息 -->
3234
<string name="xupdate_error_install_failed">安装APK失败!</string>
3335
<string name="xupdate_error_download_permission_denied">无法下载:存储权限申请被拒绝!</string>
3436
<string name="xupdate_error_download_failed">下载失败!</string>

xupdate-lib/src/main/res/values/xupdate_strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
-->
1616

1717
<resources>
18-
<!-- 更新界面使用到的内容,界面国际化需要配置这些内容 -->
18+
<!-- Update the content used in the interface, which needs to be configured for the internationalization of the interface -->
1919
<string name="xupdate_lab_update">Upgrade</string>
2020
<string name="xupdate_lab_background_update">Background Upgrade</string>
2121
<string name="xupdate_lab_install">Install</string>
@@ -29,7 +29,7 @@
2929
<string name="xupdate_lab_downloading">Downloading:</string>
3030
<string name="xupdate_tip_download_url_error">New version download path error</string>
3131

32-
<!-- 更新错误信息 -->
32+
<!-- Update error message -->
3333
<string name="xupdate_error_install_failed">Failed to install APK!</string>
3434
<string name="xupdate_error_download_permission_denied">Unable to download: storage permission request rejected!</string>
3535
<string name="xupdate_error_download_failed">Download failed!</string>

0 commit comments

Comments
 (0)