Repository files navigation
Translator for Android string resource
Must have python version 3
Must have billing enabled in Google Cloud Platform (GCP)
Install this python package (if not installed).
bs4
Install the google client translation library pip install --upgrade google-cloud-translate
Goto GCP console (https://console.cloud.google.com/ ) then under IAM & Admin click Service accounts.
Create service account and assign a role as project owner.
Create key which will be downloaded into your computer.
Clone and go to the project directory
Put service account there and rename to project-service-account.json
Use this command python translator-for-android.py <source-string-file> <languages list>
Example python translator-for-android.py strings.xml fr or python translator-for-android.py strings.xml fr,de,nl
To translate to all available languages just provide source string in the command
After above operation you will get new translated file(s) in current directory
About
This is ready-made translator for android strings. Provide the input file and copy the generated directories into res/ in android project.
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.