How to use AI to better translate AntV open source documents

Written by
Audrey Miles
Updated on:June-16th-2025
Recommendation

The latest practical cases of AI technology in the field of document translation, exploring how to optimize the internationalization of AntV open source documents.

Core content:
1. Limitations and challenges of traditional translation tools
2. Advantages of LLM translation and pain points of manual proofreading
3. Innovative applications of AI Agent and Cursor in automated translation

 
Yang Fangxian
Founder of 53A/Most Valuable Expert of Tencent Cloud (TVP)

Recently, AntV is promoting the internationalization of documents for G2 and G6. It sounds like a simple matter of "translating Chinese documents into English", but when we actually do it, we find that it is a content engineering challenge, which is far more than just "finding a translation tool and pasting it".

We have experienced the evolution from traditional translation tools to AI Agent. We hope that this practical note can provide you with some references in multilingual document management, AI engineering implementation, etc.

Phase 1: Traditional translation tools, fast but poor quality

At first, we used translation tools such as DeepL and Google Translate. The advantages are simplicity and speed, but we soon encountered several unacceptable problems:

  • Terminology confusion : For example, the word "interaction" in G6 is sometimes translated as interaction and sometimes as behavior.
  • Unnatural sense of language : Chinese expressions are obvious and do not sound professional enough
  • The structure is broken : headings, code blocks, and links in Markdown are often mishandled

Verdict: Good for quick previews, but not suitable for production-level documentation.

Phase 2: Introducing LLM translation, quality improved but still requires manual proofreading

With the rise of GPT, we handed over the translation task to LLM. The overall quality has improved significantly, especially in:

  • Strong understanding of context and more coherent sentences
  • The language is natural and in line with the style of technical documentation

However, there are still several pain points in manual review:

  • Inconsistent terminology and lack of unified vocabulary support
  • Jump links are not automatically localized , such as /manual/getting-started Not automatically replaced with /en/manual/getting-started
  • The Chinese path was translated directly , causing the link to fail

We give this method a score of 80. The quality is adequate, but the cost of manual correction is still high.

Phase 3: Initial exploration of AI Agent and attempts at process automation

To further reduce manual intervention, we built a "Translation Agent based on Prompt + LLM" to strengthen the following points:

  • Supports preserving Markdown format structure
  • Ignore code blocks, command lines, and other content that does not need to be translated
  • Automatically handle link redirects and language paths
  • Configure glossary and unify translation results

This step makes the translation "rule-aware", but there are still two problems:

  1. Contexts and rules need to be maintained manually, and the configuration threshold is high
  2. Unable to be directly implemented in the development environment, and the process is fragmented

Phase 4: Introducing Cursor to achieve local high-quality automatic translation

Currently, the main solution we use is: "Cursor + Translation Rules" .

Cursor is a development IDE integrated with LLM. Its translation solution provides stronger engineering control capabilities:

? Rule-driven translation logic

pass .cursor/translation-rules Files, we can:

  • Setting the glossary
  • Configure syntax blocks that are not translated
  • Custom link replacement rules
  • Define language style (e.g. British/American English)

⚙️ Prompt is triggered in combination with rules

In Cursor, just enter translate It will automatically load the translation rules and inject them into LLM as context.

  • You don’t have to remind the AI ​​every time what to do
  • AI output is more stable and conforms to the expected format

Automatically write to file

After the translation is completed, Cursor will directly modify the target English document, eliminating the steps of pasting and comparing, greatly improving efficiency.

Conclusion: Semi-automated translation process, high-quality output, and minimal proofreading costs

Currently, this rule-based translation and collaboration method has been implemented in the G6 project . If you are interested, you can directly pull the latest code base of G6 to experience the effect of translation rules in real projects.

Extended application: Not only documents, but also business projects can use it

Cursor's rule system is not only suitable for document translation, but can also be extended to daily development, such as:

  • Unified code style naming conventions
  • Define UI component styles (such as button color, font)
  • Generate a unified test code template
  • Restrict project structure (such as directory organization)

In version 0.49, Cursor also added the "Generate Cursor Rules" function. Just enter one sentence:

If you want the subsequent code to maintain a unified UI style, please generate corresponding design rules.

It will automatically generate Design System rules that match the project style, and all AI-generated content in the future will follow this set of rules.

Summary

Document translation is essentially a part of content engineering. AI cannot do all the work for you, but if it is combined with "task decomposition + clear rules + tool integration", it can be a powerful automation assistant.

Our practice has verified the feasibility of this path:

  • From  Translation Tools → LLM → Prompt Agent → Engineering IDE
  • From  individual improvement → team collaboration → rule system precipitation

If you are also building multilingual documents and trying to make AI truly "understand what you are saying", it is recommended to start with rules. I recommend reading an article that is very inspiring to us:  Cursor Rules: Why Your AI Agent Is Ignoring You (and How to Fix It) [1