使用Google译者工具包(Translator Toolkit )让部署国际化应用程序更加容易
最近开发一款多国语言版本的Android翻译应用,需要用到九国语言适配,英语日语什么的结合词典还能凑合着翻译,但其他那些小语言就没辙了。现在强大的Google提供了更为高级的机器翻译工具:
Google译者工具包能为业余和专业翻译人员提供的在线翻译工具。尤其对于对于广大的Android开发者,实现国际化部署就显得更加轻松。
Google译者工具包目前支持的格式有:
- AdWords 编辑器存档格式 (.aea)
- Android Resource (.xml)
- Application Resource Bundle (.arb)
- Chrome Extension (.json)
- GNU gettext (.po)
- HTML (.html)
- Microsoft Word (.doc)
- OpenDocument Text (.odt)
- 纯文本 (.txt)
- RTF (.rtf)
- SubRip (.srt)
- SubViewer (.sub)
提供的格式很丰富, 不管是应用、字幕、文本、word等都能翻译。
翻译前后对比:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <resources>
2 <string name="app_name">跟我学意大利语</string>
3 <string name="search_label">搜索</string>
4 <string name="voice_label">长按复读</string>
5 <string name="collect_label">收藏</string>
6 <string name="setting_label">设置</string>
7 <string name="finish_btn">完成</string>
8 <string name="collect_success">收藏成功</string>
9 <string name="cancel_collect">取消收藏</string>
10 <string name="language_label">目标语言选择</string>
11 <string name="delete">删除?</string>
12 <string name="clean">清空收藏夹</string>
13 <string name="noMIC_warning">没有麦克风,无法复读</string>
14 <string name="share_title">分享</string>
15 <string name="warning">无记录!</string>
16 </resources
2 <string name="app_name">跟我学意大利语</string>
3 <string name="search_label">搜索</string>
4 <string name="voice_label">长按复读</string>
5 <string name="collect_label">收藏</string>
6 <string name="setting_label">设置</string>
7 <string name="finish_btn">完成</string>
8 <string name="collect_success">收藏成功</string>
9 <string name="cancel_collect">取消收藏</string>
10 <string name="language_label">目标语言选择</string>
11 <string name="delete">删除?</string>
12 <string name="clean">清空收藏夹</string>
13 <string name="noMIC_warning">没有麦克风,无法复读</string>
14 <string name="share_title">分享</string>
15 <string name="warning">无记录!</string>
16 </resources
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 <resources>
2 <string name="app_name">
3 "With me to learn Italian"
4 </string>
5 <string name="search_label">
6 " Search"
7 </string>
8 <string name="voice_label">
9 "Press and repeat"
10 </string>
11 <string name="collect_label">
12 "Favorites"
13 </string>
14 <string name="setting_label">
15 "Save Setting"
16 </string>
17 <string name="finish_btn">
18 "Completed"
19 </string>
20 <string name="collect_success">
21 "Collection success"
22 </string>
23 <string name="cancel_collect">
24 "Unsubscribe"
25 </string>
26 <string name="language_label">
27 "The target language selection"
28 </string>
29 <string name="delete">
30 "Delete"
31 </string>
32 <string name="clean">
33 "Empty the collection clip"
34 </string>
35 <string name="noMIC_warning">
36 "No microphone, unable to repeat"
37 </string>
38 <string name="share_title">
39 "Share"
40 </string>
41 <string name="warning">
42 "No records!"
43 </string>
44 </resources
2 <string name="app_name">
3 "With me to learn Italian"
4 </string>
5 <string name="search_label">
6 " Search"
7 </string>
8 <string name="voice_label">
9 "Press and repeat"
10 </string>
11 <string name="collect_label">
12 "Favorites"
13 </string>
14 <string name="setting_label">
15 "Save Setting"
16 </string>
17 <string name="finish_btn">
18 "Completed"
19 </string>
20 <string name="collect_success">
21 "Collection success"
22 </string>
23 <string name="cancel_collect">
24 "Unsubscribe"
25 </string>
26 <string name="language_label">
27 "The target language selection"
28 </string>
29 <string name="delete">
30 "Delete"
31 </string>
32 <string name="clean">
33 "Empty the collection clip"
34 </string>
35 <string name="noMIC_warning">
36 "No microphone, unable to repeat"
37 </string>
38 <string name="share_title">
39 "Share"
40 </string>
41 <string name="warning">
42 "No records!"
43 </string>
44 </resources
这个是我上传工程资源文件夹下string.xml后翻译页面的示意图,你可以在线编辑、下载翻译结果等等,相当的方便,来试试吧。