Easily generate multilingual translations for your project with a single command, powered by Azure AI Services.
Type | Name |
---|---|
Language Model | |
Computer Vision |
Note
If a computer vision service is not available, the co-op translator will switch to Markdown-only mode.
Co-op Translator is a Python package designed to automate multilingual translations for your projects using advanced Large Language Model (LLM) technology and Azure AI Services. This project aims to simplify the process of translating content into multiple languages, making it accessible and efficient for developers.
By integrating Co-op Translator into your workflow, you can automatically generate organized translation folders for different languages, and translate both Markdown files and images effortlessly.
Here is an example of how Co-op Translator structures the translations and translates both Markdown files and text within images in your project:
Ready to unlock multilingual accessibility? Get started with Co-op Translator today!
- Automated Translations: Translate text into multiple languages effortlessly.
- Markdown Preservation: Maintain correct Markdown syntax during translation.
- Image Text Translation: Extract and translate text within images.
- Advanced LLM Technology: Utilize cutting-edge language models for high-quality translations.
- Easy Integration: Seamlessly integrate with your existing project setup.
- Simplify Localization: Streamline the process of localizing your project for international markets.
English is often considered the universal language of technology, but many developers worldwide are non-native English speakers. This can create barriers in accessing and contributing to technical projects.
Co-op Translator aims to break down these language barriers by providing an easy-to-use tool for automating translations. By making technical documentation accessible in multiple languages, we empower developers, students, and researchers globally.
Join us in revolutionizing global communication! Give a โญ to Co-op Translator on GitHub and help us break down language barriers together. Your support makes a difference!
The process begins with Markdown and image files from your project folder, which are processed by various AI services:
- Language Models:
- Azure OpenAI and other supported LLMs translate text from Markdown files. See the supported models and services for more information.
- Computer Vision Services (optional):
- Azure Computer Vision extracts text from images, which are then translated by the selected language model. If a computer vision service is not available, the process defaults to Markdown-only mode.
The final translated Markdown and image files are saved in the designated translation folder, ready to be used in multiple languages.
- Python 3.10 or higher: Required for running the Co-op Translator.
- Language Model Resource:
- Azure OpenAI or other LLMs. Details can be found in the supported models and services.
- Computer Vision Resource (optional):
- For image translation. If unavailable, the translator defaults to Markdown-only mode.
- Azure Computer Vision
pip install co-op-translator
poetry add co-op-translator
Note
While this tutorial focuses on Azure resources, you can use any supported language model from the supported models and services list.
-
Set up resources
- Set up Azure OpenAI
- Set up Azure Computer Vision (optional)
-
Create an '.env' file in the root directory
- Include necessary keys for the chosen language model service.
- If Azure Computer Vision keys are omitted or
-md
is specified, the translator will operate in Markdown-only mode.
- Command reference: Learn about all available commands and their options in detail.
- Multi-language support setup: Before starting the translation process, you can add a table in the README that links to the translated versions of your document.
- Supported Languages: Check the list of supported languages and instructions to add new languages.
- Markdown-Only Mode: Learn how to use Co-op Translator in Markdown-only mode.
These case studies show how Co-op Translator was applied to translate a real-world project. It highlights the translation process, the challenges encountered, and the results achieved, providing a useful reference for applying the tool to similar projects.
Learn more about Co-op Translator through our 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.
-
Microsoft Reactor: A one-hour detailed step-by-step guide covering everything from understanding what Co-op Translator is, setting up the tool, and using it effectively, to a live demo showcasing its capabilities in action.
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.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
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.
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.