-
Notifications
You must be signed in to change notification settings - Fork 4
Quick Start
Wyndam edited this page Jun 17, 2018
·
6 revisions
- First download release zip file here LATEST RELEASE.
- Install JRE or JDK to run this tools. You can download here JDK DOWNLOAD.
- Config
translate_config.ini
file in the RELEASE zip file root path.-
translatePlatform
choose the translate platform, official supportgoogle
,baidu
andyoudao
. - Translate platform may need you register developer account to access translate api,
this
appId
,appKey
andapiUrl
three param you can get it form translate platform api doc.others
is a list of param, now it doesn't use, it will pass to your plugin, if you need some params in config you can set it here. -
baidu need
appId
,appKey
andapiUrl
, you should replace it with your own key. -
google just need
appKey
andapiUrl
. - youdao just like baidu.
-
apiUrl
this param may not change, it just support you a way to change if need. -
textType
set the source typed text type, official support android and ios strings doc. -
sourceLanguage
source language -
destinationLanguage
destination language, the value you can find insupport_language.txt
. It can be a single value, or a list value, or special "all" value. -
sourceFilePath
translate file path, plugin will scan the path to translate. it should in your tools root path, it is a RELATIVE path.
-
- Copy the file you want to translate in the tools path.
- run the script
run.bat
orrun.sh
, it depends on your system.
[platform key]
# baidu translate api info, you should replace it with your own.
# the doc is here: http://api.fanyi.baidu.com/api/trans/product/apidoc
;appId = 123412341
;appKey = asdfasqre14as11423412
;apiUrl = https://api.fanyi.baidu.com/api/trans/vip/translate
;others =
# google translate api info, you should replace it with your own.
# doc is here: https://cloud.google.com/translate/v2/quickstart
appId =
appKey = asdkfhkjhewqrWEQRBAWER124512
apiUrl = https://translation.googleapis.com/language/translate/v2
others =
# youdao translate api info, you should replace it with your own.
# the doc is here: http://ai.youdao.com/docs/doc-trans-api.s#p02
; appId = 1234542212341
; appKey = asdftrrsaqwerfgasTQE1234RTEWQtw
; apiUrl = http://openapi.youdao.com/api
; others =
[platform]
# now support google, baidu, youdao translate platform api.
# the value you can choose are "google", "baidu", "youdao"
translatePlatform = google
[text type]
# now support android .xml string res and ios .strings string res translate.
# the value you can choose are "android" or "ios"
textType = android
[translator]
# the source language you provided.
sourceLanguage = zh-CN
# if you want translate all language you should use "all" to replace this value.
# use "all" means you want translate the platform support all languages;
# or you should use language code to tell the translate you want to translate.
#
# the platform support language contains in the root of the project support_laguage.txt
# you can check this file to get the platform support language
# eg1: destinationLanguage = en
# eg2: destinationLanguage = en,zh-TW
# eg3: destinationLanguage = all
destinationLanguage = en
# the translate file must in the same path or sub dir of the translator.jar.
# this value assign the folder name, if you don't want use sub dir,
# just use "/" to replace the value
sourceFilePath = values