Unity Game UI Text Hooking for Cross-Version Translation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing game translation methods for Unity 3D games, particularly those not supporting Chinese language, face issues of compatibility, non-uniform file formats, language resource package integrity checks, incomplete translation due to embedded UI languages, and maintainability challenges, leading to significant language barriers and usability hurdles.

Innovation Solution

A game translation method utilizing containerization and general translation technology, which involves hooking UI text setting APIs to translate game interface text without modifying the game language resource package, enabling comprehensive translation across all IL2CPP-based Unity 3D games by controlling the game logic through a simulator and setting code logic with translation functions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If traditional game translation methods are used for Unity 3D games, then translation can be achieved for some games, but compatibility is poor and file formats are non-uniform, requiring specific logic processing for each game

Engineering Contradiction:
Improvetranslation compatibilityVSAvoidprocessing complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies universality by creating a unified translation framework that works across all IL2CPP-based Unity 3D games through a common file structure (byteswapped_string_table.txt and byteswapped_dictionary.txt) and standardized translation process. This eliminates the need for game-specific processing logic while maintaining broad compatibility across different games and versions.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent utilizes parameter changes by detecting and adapting to different game versions and configurations automatically. The translation system adjusts its parameters (such as file paths, encoding methods, and translation depth) based on the specific game environment, enabling universal compatibility without requiring manual configuration for each game.

Inventive Principle:
Principle #35Parameter changes

2Ease of operation

If language resource packages are modified for translation, then interface text can be translated, but integrity checks fail and translation is incomplete due to embedded UI languages

Engineering Contradiction:
Improvetranslation completenessVSAvoidpackage integrity
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent extracts the translation function from the language resource package modification process. Instead of modifying the package files directly (which triggers integrity checks), the system extracts UI text at runtime through API hooking and translates it separately, then applies the translated text back to the game interface without touching the original package files, thus maintaining integrity while achieving complete translation.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an intermediary translation layer between the game's language resource package and the UI display. This intermediary system ( consisting of hook functions and translation modules) captures the original text, translates it through a separate channel, and presents the translated result without the game detecting any modifications to its original language resources, thereby preserving package integrity while achieving full translation coverage.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If manual translation methods are used, then translation accuracy can be maintained, but the process is time-consuming and difficult to maintain

Engineering Contradiction:
Improvetranslation accuracyVSAvoidtranslation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by establishing a comprehensive translation framework in advance that automatically handles text extraction, translation, and application. The system pre-configures hook functions, translation rules, and file structures during initial setup, enabling subsequent translations to proceed automatically without manual intervention for each game, thus reducing time loss while maintaining accuracy through consistent processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The translation system implements self-service by automatically detecting game types, selecting appropriate translation strategies, and executing the translation process without requiring manual configuration or intervention. The system serves itself by maintaining its own translation database, managing file structures, and adapting to different games autonomously, which significantly reduces the time and effort required compared to manual translation methods while preserving accuracy through systematic processing.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12578981B2Game translation method, and electronic device, and computer readable medium thereof
Publication Date: 2026.03.17 NETEASE (HANGZHOU) NETWORK CO LTD
  • US12578981B2 patent drawing
  • US12578981B2 patent drawing
  • US12578981B2 patent drawing

AI summary

A game translation method, an electronic device, and a computer readable medium are provided. The method includes: providing a target operating system on a terminal device by running a simulator, wherein the simulator is an application program configured on the terminal device; in response to a trigger operation on an icon of a target game program in the simulator, controlling running of the target game program in the target operating system; determining a target file in the target game program, wherein the target file includes code logic for first interface text setting; setting code logic with translation function in the code logic for first interface text setting, and translating original text information in a game interface by the code logic with translation function to obtain target text information; and displaying, through code logic for second interface text setting, a corresponding game interface according to the target text information.