The Co-op Translator is a command-line interface (CLI) tool designed to help you translate all the markdown files and images in your project into multiple languages. This tutorial will guide you through configuring the translator and running it for various use cases.
You can create a virtual environment using either pip
or Poetry
. Type one of the following commands inside your terminal.
python -m venv .venv
poetry init
After creating the virtual environment, you’ll need to activate it. The steps differ based on your operating system. Type the following command inside your terminal.
Windows:
.venv\Scripts\activate
Mac/Linux:
source .venv/bin/activate
If you created the environment with Poetry, type the following command inside your terminal to activate it.
poetry shell
Once your virtual environment is set up and activated, the next step is to install the necessary dependencies.
Install via Co-Op Translator via pip
pip install co-op-translator
Or
Install via poetry
poetry add co-op-translator
![NOTE] Please do NOT do this if you install co-op translator via the quick install.
If you’re using pip, type the following command inside your terminal. It will automatically install the required packages specified in the requirements.txt
file:
pip install -r requirements.txt
If you’re using Poetry, type the following command inside your terminal. It will automatically install the required packages specified in the pyproject.toml
file:
poetry install