Translates string resources in Android applications. Uses AI API to translate string resources into selected languages of the world.
🛠️ The project is in active development. At the moment only Android projects.
Coming soon
- Make a replacement in the files
_is_debug = True
[Temporary solution]
- Add the
default-translator-config.yml
file to the root of your Android project. - Configure the values in the configuration file. Configuration example
{config}
- basic configuration{appDescription}
- application description. String with the application description.- Example:
Quiz Platform is a platform for creating and playing quizzes.
- Example:
{sourceLanguage}
- source language. String with the language code.- Example:
en
for English, etc.
- Example:
{targetLanguages}
- target language. Array of languages to translate into.- Example:
["en", "ru", "fr"]
- Example:
{aiProvider}
- AI provider. Available options:openai
- OpenAIyandex
- Yandex GPT
{aiKey}
- API key for AI. String with the API key.- Example:
sk-...
for OpenAI,AQAAAA...
for Yandex GPT.
- Example:
{aiFolder}
- project ID in the cloud for AI. Only for Yandex GPT. String with the project ID.- Example:
b1g2...
for Yandex GPT.
- Example:
{aiModel}
- AI model. Available options:gpt-4.1-mini
- OpenAI GPT-4.1-Mini, etc. Default isgpt-4.1-mini
.yandexgpt-lite
- Latest Yandex GPT, etc. Default isyandexgpt-lite
.
{excludeTranslated}
- exclude already translated strings. Boolean value.
{exclude}
- exclude from translation. Array of strings to exclude from translation.- Example:
["app_name", "app_description"]
- Example:
- Add the file
default-translator-prompt.txt
to the root of your Android project. - Required arguments in the prompt:
{source_lang_full}
- original language{target_lang_full}
- translation language{app_description}
- application description{module_description}
- module or screen description{words_json}
- Example of JSON response with translated words
- Add the
translator-config.yml
file to the root of the module. - Configure the values in the configuration file. Configuration example
{config}
- base configuration for the module{moduleDescription}
- module or screen description. String with the module description.- Example:
Correct screen for the quiz platform.
- Example:
{excludeTranslated}
- exclude already translated strings. Boolean value.
{exclude}
- exclude from translation. Array of strings to exclude from translation.- Example:
["app_name", "app_description"]
- Example:
python3 aitranslator.py --project_dir=<path_to_project>
Coming soon
Copyright 2025 Roman Likhachev
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.