This project uses the Google Translate API to automatically translate the content of a YAML file from one language to another.
- Clone this repository to your local machine.
git clone https://github.com/yourusername/your-repository.git
- Navigate to the project directory.
cd your-repository
- Install the required Python packages.
pip install -r requirements.txt
Run the script translate_yaml.py
with the following command-line arguments:
-i
or--input
: The path to the input YAML file.-o
or--output
: The path to the output YAML file.-s
or--source
: The source language (e.g., 'en' for English).-t
or--target
: The target language (e.g., 'ko' for Korean).-w
or--workers
: The number of worker threads to use for parallel processing.
python translate_yaml.py -i input.yml -o output.yml -s en -t ko -w 5
In the above example, the script will translate the content of input.yml
from English to Korean and save the result in output.yml
. It will use 5 worker threads for parallel processing.
The supported languages are those supported by the Google Translate API. For a full list of supported languages, refer to the Google Translate API documentation.
Due to the limitations of the free tier of the Google Translate API, there may be a delay in the translation process if the number of requests exceeds the limit.
This project is licensed under the terms of the MIT license.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project, you agree to abide by its terms.