-
-
Notifications
You must be signed in to change notification settings - Fork 8
Web Google Translate Guide
Date: February 8, 2026 | Version: 2.6.7+
Author's Note: This guide is prepared specifically for users utilizing the free web-based Google Translate service (translate.google.com).
- What is Web Google Translate?
- Technical Limitations
- RenLocalizer Solutions
- Configuration
- Best Practices
- Troubleshooting
- Improvement Roadmap
Web Google Translate = The free, browser-based translation service accessed via translate.google.com.
| Feature | Web Version (Free) | Paid Cloud API v2 |
|---|---|---|
| Cost | β Free | β Paid (~$20 per 1M chars) |
| HTML Protection | β None | β
format=html
|
translate="no" Support |
β No support | β Full support |
| Speed | β Very Fast | |
| Reliability | β Guaranteed SLA |
Sent: "Hello [player_name] {color=#fff}text{/color}"
Google's Perception: Everything is plain text to be translated.
β
Result: "[player OUTSIDE_NAME {color = #fff} text {/ color}" β CORRUPTED!
Reason: The web-based Google Translate:
- Does not understand the
format=htmlparameter. - Ignores HTML attributes like
translate="no". - Focuses strictly on plain text translation.
Google Translate often adds arbitrary spaces to technical tokens during translation:
Sent by RenLocalizer: VAR0
Google translation: VAR 0 β Space added!
Result: Cannot restore VAR 0 to the original variable.
- Web-based = Rate limits applied per IP.
- Stricter restrictions when using standard VPNs/Proxies.
- Risk of temporary bans:
429 Too Many Requests.
Principle: Use tokens instead of HTML tags during the translation phase.
# RenLocalizer sends protected text:
"Hello VAR0 TAG0textTAG1"
# Placeholder dictionary (stored locally):
{
'VAR0': '[player_name]',
'TAG0': '{color=#fff}',
'TAG1': '{/color}'
}
# Google translates:
"Hello VAR0 TAG0textTAG1"
# RenLocalizer restores:
"Hello [player_name] {color=#fff}text{/color}"Setting:
{
"use_html_protection": false
}Problem: Google changes VAR0 β VAR 0.
Solution: Phase 0.5 Pre-processing logic.
# Inside restore_renpy_syntax():
spaced_pattern = re.compile(r'(VAR|TAG|ESC_OPEN|ESC_CLOSE|XRPYX[A-Z]*)\s+(\d+|[A-Z_]*)')
# Converts "VAR 0" back to "VAR0" before restoring the original syntax.Test Results:
"VAR 0 created" β "[player_name] created" β
FIXED
"TAG 5 text" β "{b}text" β
FIXED
"ESC_OPEN 2 code" β "[var]code" β
FIXED
Function: validate_translation_integrity()
Checks for missing placeholders after translation:
missing = validate_translation_integrity(text, placeholders)
if missing:
print(f"β οΈ WARNING: Missing placeholders: {missing}")
# Log, retry translation, or warn the user.In src/utils/config.py:
use_html_protection: bool = True # Global default (Safe for Cloud APIs){
"use_html_protection": false,
"translation_engine": "google",
"verify_placeholders": true,
"retry_failed_strings": true
}| Action | Success Rate | Reason |
|---|---|---|
| Use Token Mode | β 100% | Foundation for web-based safety |
| Enable Integrity Validation | β 100% | Catches corruption early |
| Use Retry Logic | β 95% | Recovers from network glitches |
| Test Small Batches First | β 90% | Quick validation before full game |
| Action | Success Rate | Reason |
|---|---|---|
| Enable HTML Mode | β 0% | Web version doesn't support tags |
| Large Batch Sizes (>100) | β 15% | High risk of 429 Rate Limit |
| Long sessions without Proxy | β 5% | IP will eventually be flagged |
Symptoms:
[player_name] β [player OUTSIDE_NAME]
{color=#fff} β {color = #fff}
Solution:
- Ensure Spaced Token Fix is enabled (v2.6.7+ performs this automatically).
- If it persists, check the token regex in
syntax_guard.py.
Symptoms:
- The process stops or skips many lines.
- "Too Many Requests" appears in logs.
Solutions:
-
Rotate Proxies: Use
Settings > Proxy Manager. -
Reduce Threads: Set
Concurrent Threadsto1or2. -
Increase Delay: Add
1-2 secondsbetween requests.
- A) Pattern Expansion: Add broader support for various spacing styles (e.g., "V AR 0").
- B) Fuzzy Matching: Use Jaro-Winkler or Levenshtein ratios to match corrupted tokens.
- C) Context-Aware Recovery: If "VAR" is expected but missing, scan nearby text for digits.
- A) Auto-Detection: Automatically disable HTML protection if web-based endpoints are detected.
- B) Interactive Fix UI: Allow users to manually drag-and-drop missing placeholders into the translated text.
| Engine | Speed | Reliability | Cost |
|---|---|---|---|
| Web Google (Token) | 120s | 85% (Fixed) | Free |
| Paid Google Cloud API | 15s | 98% (HTML) | Paid |
| OpenAI (GPT-4o) | 8s | 99% | Paid |
| Local LLM (Llama 3) | 60s+ | 95% | Free (needs GPU) |
If you are using Web Google Translate:
- β
Set
use_html_protection = falsein Settings. - β Update to v2.6.7+ for the automatic spaced token fix.
- β Keep Batch Size moderate to avoid rate limits.
Result: With the new recovery logic, RenLocalizer achieves a 95%+ success rate even on the free web-based Google Translate service.
Last updated: 8 Feb 2026 | RenLocalizer Documentation v2.6.7
- Advanced-Parsing
- RPA-Extraction
- Glossary-Management
- External-Translation-Memory β (NEW) Reuse translations across games
- Technical-Filtering
- Proxy-and-Rate-Limits
- Web-Google-Translate-Guide