How can non-technical documents—such as educational materials in Word or PDF formats—that contain numerous code snippets be translated?

Core Issue Diagnosis

Many educational courseware documents or product manuals intersperse code variables within standard paragraphs. Standard translation tools often attempt to translate these (for instance, converting `Print()` into `打印()`).

Root Cause Analysis

Font-based code identification

For PDF or Word files, the system analyzes font attributes. Typically, code is presented in monospaced fonts (such as Courier New). We leverage this feature to automatically lock these regions and prevent their translation.

Keyword whitelist

The system includes built-in reserved word libraries for mainstream programming languages such as Java, Python, and C++. Even if code is not marked as a code block, the AI can identify keywords like `function`, `class`, and `var`, and preserve them in their original form.

Instant preview and correction

With the free preview feature, users can quickly check whether any code sections have been mistranslated and promptly adjust settings or apply term locks as needed.

Final Solution Summary

Intelligent differentiation between natural language and machine language is essential for handling technical educational materials.