Skip to main content

Easily automate the translation of your documentation into multiple languages to reach a global audience.

Project description

Co-op Translator

Easily automate and maintain translations for your educational GitHub content across multiple languages as your project evolves.

Python 3.10–3.12 Python package License: MIT Downloads Downloads Container: GHCR Code style: black

GitHub contributors GitHub issues GitHub pull-requests PRs Welcome

🌐 Multi-Language Support

Supported by Co-op Translator

Arabic | Bengali | Bulgarian | Burmese (Myanmar) | Chinese (Simplified) | Chinese (Traditional, Hong Kong) | Chinese (Traditional, Macau) | Chinese (Traditional, Taiwan) | Croatian | Czech | Danish | Dutch | Estonian | Finnish | French | German | Greek | Hebrew | Hindi | Hungarian | Indonesian | Italian | Japanese | Kannada | Korean | Lithuanian | Malay | Malayalam | Marathi | Nepali | Nigerian Pidgin | Norwegian | Persian (Farsi) | Polish | Portuguese (Brazil) | Portuguese (Portugal) | Punjabi (Gurmukhi) | Romanian | Russian | Serbian (Cyrillic) | Slovak | Slovenian | Spanish | Swahili | Swedish | Tagalog (Filipino) | Tamil | Telugu | Thai | Turkish | Ukrainian | Urdu | Vietnamese

Prefer to Clone Locally?

This repository includes 50+ language translations which significantly increases the download size. To clone without translations, use sparse checkout:

git clone --filter=blob:none --sparse https://github.com/*****.git
cd *****
git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'

This gives you everything you need to complete the course with a much faster download.

GitHub watchers GitHub forks GitHub stars

Microsoft Foundry Discord

Open in GitHub Codespaces

Overview

Co-op Translator helps you localize your educational GitHub content into multiple languages effortlessly. When you update your Markdown files, images, or notebooks, translations stay automatically synchronized, ensuring your content remains accurate and up to date for learners worldwide.

Example of how translated content is organized:

Example

How translation state is managed

Co-op Translator manages translated content as versioned software artifacts,
not as static files.

The tool tracks the state of translated Markdown, images, and notebooks using language-scoped metadata.

This design allows Co-op Translator to:

  • Reliably detect outdated translations
  • Treat Markdown, images, and notebooks consistently
  • Scale safely across large, fast-moving, multi-language repositories

By modeling translations as managed artifacts, translation workflows align naturally with modern software dependency and artifact management practices.

How translation state is managed

Quick start

# Create and activate a virtual environment (recommended)
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
# Install the package
pip install co-op-translator
# Translate
translate -l "ko ja fr" -md

Docker:

# Pull the public image from GHCR
docker pull ghcr.io/azure/co-op-translator:latest
# Run with current folder mounted and .env provided (Bash/Zsh)
docker run --rm -it --env-file .env -v "${PWD}:/work" ghcr.io/azure/co-op-translator:latest -l "ko ja fr" -md

Minimal setup

  1. Assert that you have a supported Python version (currently 3.10-3.12). In poetry (pyproject.toml) this is handeled automatically.
  2. Create a .env file using the template: .env.template
  3. Configure one LLM provider (Azure OpenAI or OpenAI)
  4. (Optional) For image translation (-img), configure Azure AI Vision
  5. (Optional) You can configure multiple credential sets by duplicating variables with suffixes like _1, _2, etc. All variables in a set must share the same suffix.
  6. (Recommended) Clean up any previous translations to avoid conflicts (e.g., translations/)
  7. (Recommended) Add a translation section to your README using the README languages template
  8. See: Set up Azure AI

Usage

Translate all supported types:

translate -l "ko ja"

Only Markdown:

translate -l "de" -md

Markdown + images:

translate -l "pt" -md -img

Only notebooks:

translate -l "zh" -nb

More flags: Command reference

Features

  • Automated translation for Markdown, notebooks, and images
  • Keeps translations in sync with source changes
  • Works locally (CLI) or in CI (GitHub Actions)
  • Uses Azure OpenAI or OpenAI; optional Azure AI Vision for images
  • Preserves Markdown formatting and structure

Docs

Microsoft-specific guide

[!NOTE] For maintainers of the Microsoft “For Beginners” repositories only.

Support us and foster global learning

Join us in revolutionizing how educational content is shared globally! Give Co-op Translator a ⭐ on GitHub and support our mission to break down language barriers in learning and technology. Your interest and contributions make a significant impact! Code contributions and feature suggestions are always welcome.

Explore Microsoft educational content in your language

Video presentations

👉 Click the image below to watch on YouTube.

  • Open at Microsoft: A brief 18-minute introduction and quick guide on how to use Co-op Translator.

    Open at Microsoft

Contributing

This project welcomes contributions and suggestions. Interested in contributing to Azure Co-op Translator? Please see our CONTRIBUTING.md for guidelines on how you can help make Co-op Translator more accessible.

Contributors

co-op-translator contributors

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Responsible AI

Microsoft is committed to helping our customers use our AI products responsibly, sharing our learnings, and building trust-based partnerships through tools like Transparency Notes and Impact Assessments. Many of these resources can be found at https://aka.ms/RAI. Microsoft's approach to responsible AI is grounded in our AI principles of fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability.

Large-scale natural language, image, and speech models - like the ones used in this sample - can potentially behave in ways that are unfair, unreliable, or offensive, in turn causing harms. Please consult the Azure OpenAI service Transparency note to be informed about risks and limitations.

The recommended approach to mitigating these risks is to include a safety system in your architecture that can detect and prevent harmful behavior. Azure AI Content Safety provides an independent layer of protection, able to detect harmful user-generated and AI-generated content in applications and services. Azure AI Content Safety includes text and image APIs that allow you to detect material that is harmful. We also have an interactive Content Safety Studio that allows you to view, explore and try out sample code for detecting harmful content across different modalities. The following quickstart documentation guides you through making requests to the service.

Another aspect to take into account is the overall application performance. With multi-modal and multi-models applications, we consider performance to mean that the system performs as you and your users expect, including not generating harmful outputs. It's important to assess the performance of your overall application using generation quality and risk and safety metrics.

You can evaluate your AI application in your development environment using the prompt flow SDK. Given either a test dataset or a target, your generative AI application generations are quantitatively measured with built-in evaluators or custom evaluators of your choice. To get started with the prompt flow sdk to evaluate your system, you can follow the quickstart guide. Once you execute an evaluation run, you can visualize the results in Azure AI Studio.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Getting Help

If you get stuck or have any questions about building AI apps, join:

Microsoft Foundry Discord

If you have product feedback or errors while building visit:

Microsoft Foundry Developer Forum

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

co_op_translator-0.16.4.tar.gz (16.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

co_op_translator-0.16.4-py3-none-any.whl (16.1 MB view details)

Uploaded Python 3

File details

Details for the file co_op_translator-0.16.4.tar.gz.

File metadata

  • Download URL: co_op_translator-0.16.4.tar.gz
  • Upload date:
  • Size: 16.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for co_op_translator-0.16.4.tar.gz
Algorithm Hash digest
SHA256 642561dcf3466520fd7ba3e0f93923adc93ddcbf690ca3dd8501b9d433d323e6
MD5 38baae6c97802244d948f067842ae7dc
BLAKE2b-256 8fcf985d4e7c3681f8ea0f7ef35470beb82bb1a8ed47c13ab9fb003c1a5f9356

See more details on using hashes here.

File details

Details for the file co_op_translator-0.16.4-py3-none-any.whl.

File metadata

File hashes

Hashes for co_op_translator-0.16.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f0987380ad775fbf6e8fdeb1c6cb2a5f0e4fe6a4189e94b7007f4738b20f4aa3
MD5 2be7feff824654be892b08398914cfd5
BLAKE2b-256 4b55317c48c703ff02c708167ba2af5c34c07c25163825297d405f63970fe933

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page