@@ -12,7 +12,7 @@ OUTPUT_DIR=translated_files # Directory for translated output files
1212LLM_PROVIDER = ollama
1313# Your Google Gemini API key (required if using gemini provider)
1414GEMINI_API_KEY =
15- GEMINI_MODEL = gemini-3 -flash
15+ GEMINI_MODEL = gemini-2.0 -flash
1616# Your OpenAI API key (required if using openai provider)
1717OPENAI_API_KEY =
1818
@@ -23,9 +23,8 @@ OPENROUTER_MODEL=anthropic/claude-4.5-haiku
2323# See all models at https://openrouter.ai/models (text-only models are auto-filtered in the UI)
2424
2525# Translation Settings
26- DEFAULT_SOURCE_LANGUAGE = English # Default source language (can be any language name)
27- DEFAULT_TARGET_LANGUAGE = Chinese # Default target language (can be any language name)
28- MAIN_LINES_PER_CHUNK = 50 # Legacy parameter - kept for SRT grouping only (not used for text chunking)
26+ # Source language: Auto-detected from uploaded file (uses langdetect library)
27+ # Target language: Auto-detected from browser language (can be changed in UI)
2928MAIN_CHUNK_SIZE = 1000 # Maximum characters per chunk
3029REQUEST_TIMEOUT = 900 # API timeout in seconds
3130
@@ -51,19 +50,6 @@ AUTO_ADJUST_CONTEXT=true # Automatically adjust context/chunk size if prompt to
5150# Advanced
5251MAX_TRANSLATION_ATTEMPTS = 3
5352
54- # =============================================================================
55- # EPUB Translation - Token Alignment Fallback (Phase 2)
56- # =============================================================================
57- # When the LLM fails to preserve HTML placeholders correctly during EPUB
58- # translation, this fallback uses word-level alignment to reinsert them at
59- # semantically correct positions. This dramatically improves translation
60- # quality by ensuring 100% placeholder integrity.
61- #
62- # Multi-phase fallback system:
63- # Phase 1: Normal translation with placeholders (retry logic)
64- # Phase 2: Token alignment fallback (translate clean, then reinsert)
65- # Phase 3: Untranslated fallback (preserve original if all else fails)
66-
6753EPUB_TOKEN_ALIGNMENT_ENABLED = true
6854# Options: true (enable Phase 2 fallback), false (use old behavior with only Phase 1 + Phase 3)
6955
@@ -76,18 +62,18 @@ EPUB_TOKEN_ALIGNMENT_METHOD=proportional
7662SRT_LINES_PER_BLOCK = 20
7763SRT_MAX_CHARS_PER_BLOCK = 2000
7864
79- # Translation Signature
80- # This adds a discrete attribution to your translations (metadata for EPUB, footer for TXT, comment for SRT)
81- # Please consider keeping this enabled to support the project and help others discover this free tool!
82- # The signature is non-intrusive and placed at the end of files. Thank you for your support!
83- SIGNATURE_ENABLED = true
84-
8565# Debug Mode
8666# Enable verbose logging for troubleshooting configuration and connection issues.
8767# Set to 'true' to see detailed logs about .env loading, API calls, and configuration values.
8868# Useful when models are not detected or languages are not applied correctly.
8969DEBUG_MODE = false
9070
71+ # Translation Signature
72+ # This adds a discrete attribution to your translations (metadata for EPUB, footer for TXT, comment for SRT)
73+ # Please consider keeping this enabled to support the project and help others discover this free tool!
74+ # The signature is non-intrusive and placed at the end of files. Thank you for your support!
75+ SIGNATURE_ENABLED = true
76+
9177# TTS (Text-to-Speech) Configuration
9278# Generate audio narration of translated documents
9379# Requires ffmpeg installed on the system for Opus encoding
@@ -145,3 +131,5 @@ TTS_CFG_WEIGHT=0.5
145131# cs (Czech), ar (Arabic), zh (Chinese), ja (Japanese), hu (Hungarian),
146132# ko (Korean), hi (Hindi), vi (Vietnamese), sv (Swedish), da (Danish),
147133# fi (Finnish), id (Indonesian), el (Greek)
134+
135+
0 commit comments