To make the course accessible to a global audience, I decided to leverage Co-op Translator, an AI package that auto-translates the curriculum into different languages.
I had been tasked with maintaining two of our open-source repositories: AI for Beginners and ML for Beginners. These repositories are crucial for anyone starting their journey in the fields of Artificial Intelligence and serve as the building blocks for further learning. The curriculum offers invaluable hands-on skills to practice one's learning. As of this week, the curriculum receives traffic of up to 5,000 unique views and over 18,000 views over a period of two weeks. That's a lot, right? Each learner is diverse, coming from different locations globally, and our goal was to translate the curriculum into local languages.
Introducing Co-op Translator.
To make the course accessible to a global audience, I decided to leverage Co-op Translator, an AI package that auto-translates the curriculum into different languages. Using this tool, I translated the courses into German, Spanish, French, Hindi, Italian, Japanese, Korean, Malay, Portuguese, Russian, Swahili, Turkish, Chinese, and soon, Polish.
What is Co-op Translator?
Co-op Translator is a CLI tool designed to translate your project files, both markdown and images, into multiple languages. Currently, it supports over 40 languages and gives you the liberty to add any new languages as well. The tool uses Azure, Azure AI Services, and Azure OpenAI Service for the translations, making it seamless and easy to get started. Additionally, the tool comes with a disclaimer that the content is AI translated, ensuring everyone who comes across the content understands its translation process.
Setting Up Co-op Translator
When translating the curriculum, I used pip to install the package in GitHub Codespaces and Azure AI Foundry to get the environment variables as follows:
- On your terminal, create a python virtual environment: python -m venv .venv
- Activate the environment: source .venv/bin/activate
- Install the library: pip install co-op-translator
- Create a new project in Azure AI Foundry, in the region East US, then get the keys and endpoints.
- Go to Azure AI Foundry, sign in with your account, and click create project
- Fill in the details ensuring the region is East US and create your project
- Head over to Models + endpoints and select deploy models.
- Deploy gpt-4o-mini model to use for translations.
- On the overview page, you will find your keys and endpoints for the resources, as highlighted, you will need this to fill your .env file.
Authentication and configuration
Azure AI Services Keys and Endpoints
Azure OpenAI Service keys and endpoints
gpt-4o-mini details
- Once the project is deployed, create and update your .env file as follows:
# Azure Credentials
AZURE_SUBSCRIPTION_KEY="API Key"
AZURE_AI_SERVICE_ENDPOINT="Azure AI Services endpoint"
# Azure OpenAI Credentials
AZURE_OPENAI_API_KEY="API Key"
AZURE_OPENAI_ENDPOINT="Azure OpenAI Service endpoint"
AZURE_OPENAI_MODEL_NAME="Model Name"
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME="Name"
AZURE_OPENAI_API_VERSION="Model version"
Adding translations
- On your terminal, add the first translation to Korean: translate -l "ko"
- Follow the command reference for any further updates on translation and more.
Benefits of Using Co-op Translator
As a developer advocate, the tool has been invaluable in ensuring that content created is accessible to anyone, regardless of their location. Using the tool, I was able to save hours of translations and ensure the translations are done as soon as possible. Try Co-op Translator today and see the impact on your projects!
What Next?
With open source, as with any other project, work is never done. Now that we have the translations in place, we need contributors to join in and evaluate translations. In case you find any translations amiss, create a PR, and we will merge it into the main repository.
- Translations for ML for Beginners repository
- Translations for AI for Beginners repository
All contributions are welcome!
Updated Feb 17, 2025
Version 2.0bethanyjep
Microsoft
Joined April 26, 2022
Microsoft Developer Community Blog
Follow this blog board to get notified when there's new activity