


包括设置RegexForFullTextNeedToTranslate、RegexForEachLineNeedToTranslate和PresetTranslations都可以显著减少不必要的翻译。见详细说明。
Setting RegexForFullTextNeedToTranslate, RegexForEachLineNeedToTranslate, and PresetTranslations can significantly reduce unnecessary translations. Please refer to detailed description.
TranslationAPI
选择使用的翻译 API。支持腾讯翻译 api、百度翻译 api和 Microsoft Azure 翻译 api。截止 2025.1.29,三者的免费额度为 Tencent 500万字符/月、Baidu 100万字符/月、Azure 200万字符/月。详见官方说明。
RegexForFullTextNeedToTranslate
正则表达式,一个多行文本若匹配为真,则这个多行文本保留以待翻译。用来筛选待翻译的文本以节省翻译额度。
样例RegexForFullTextNeedToTranslate正则表达式:^(?!Enter the Gungeon).*$
RegexForEachLineNeedToTranslate
正则表达式,多行文本若存在一行匹配,整个多行文本保留以待翻译。用来筛选待翻译的文本以节省翻译额度。样例RegexForEachLineNeedToTranslate正则表达式(适配中文):^(?![@#])(?=\S)(?!^[\d\p{P}]+$)(?!.*[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]).*$
RegexForIgnoredSubstringWithinText
正则表达式,匹配文本中需要忽略的子文本。请使用非捕获组。这通常包括一些要特殊处理的贴图和转义符。样例RegexForIgnoredSubstringWithinText正则表达式(适配中文):(?:\[[^\]]*\])|(?:\{[^}]*\})|(?:\^[\w\d]{9})|(?:[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]+)|(?:<color=[^>]+>)|(?:</color>)|(?:<|>)
RequestBatchSize
发送请求的批量数据总大小。若翻译 api 提示单次请求过长,请减小此值。
MaxRetryCount
发生错误时的最大重试次数。
TranslationCacheCapacity
最大翻译缓存容量。
TranslateTextsOfItemTipsMod
翻译 ItemTipsMod 中的文本。
RegexForItemTipsModTokenizer
用于 ItemTipsMod 生成 token 的正则表达式。token 用于处理文本的自动换行位置。如每个字换行还是单词后换行。样例 RegexForItemTipsModTokenizer 正则表达式:(?:<color=[^>]+?>|</color>|[a-zA-Z0-9]+|\s+|.)
PresetTranslations
预设翻译的文件名。使用预设翻译以减少加载时常见文本的翻译请求,留空表示不使用。预设翻译为位于 dll 同目录下的 json 文件。
OverrideFont
用来覆盖游戏字体的字体。根据你需要的目标语言选择。
FontAssetBundleName
包含自定义字体的 AssetBundle 名称。位于 dll 同目录下。
CustomDfFontName
要使用的自定义 df 字体。请把它包含于 FontAssetBundle。
CustomTk2dFontName
要使用的自定义 tk2d 字体。请把它包含于 FontAssetBundle。
RegexForDfTokenizer
用于 df 生成 token 的正则表达式。token 用于处理文本的自动换行位置。如每个字换行还是单词后换行。参考默认样例填写。建议只修改 Text 相关内容。样例RegexForDfTokenizer正则表达式:(?<StartTag>\[(?<StartTagName>(color|sprite))\s*(?<AttributeValue>[^\]\s]+)?\])|(?<EndTag>\[\/(?<EndTagName>color|sprite)\])|(?<Newline>\r?)|(?<Whitespace>\s+)|(?<Text>[a-zA-Z0-9]+|.)
LogRequestedTexts
在日志中显示请求翻译的文本。
DfTextScaleExpandThreshold
低于这个值的 Df TextScale 会被扩大。为负表示不生效。
DfTextScaleExpandToValue
低于门槛的 Df TextScale 被扩大到多少。
DfDefaultLabelOverrideHeight
Df DefaultLabel 的重写高度值。为零表示不修改。
DfSimpleStatLabelOverrideHeight
Df SimpleStatLabel 的重写高度值。为零表示不修改。
TranslationAPI
Select the translation API to use. Supported APIs include Tencent Translation API, Baidu Translation API, and Microsoft Azure Translation API. As of January 29, 2025, the free quotas are: Tencent 5 million characters/month, Baidu 1 million characters/month, Azure 2 million characters/month. Please refer to the official documentation for more details.
RegexForFullTextNeedToTranslate
A regular expression that matches multiline text. If the expression evaluates to true, the entire multiline text will be preserved for translation. This helps filter out unnecessary translation requests and save tranlation quotas. Example RegexForFullTextNeedToTranslate regex: ^(?!Enter the Gungeon).*$
RegexForEachLineNeedToTranslate
A regular expression that checks each line in multiline text. If any line matches, the whole multiline text will be preserved for translation. This also helps filter out unnecessary translation requests and save tranlation quotas. Example RegexForEachLineNeedToTranslate regex (fit for Chinese): ^(?![@#])(?=\S)(?!^[\d\p{P}]+$)(?!.*[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]).*$
RegexForIgnoredSubstringWithinText
A regular expression that matches substrings within text that should be ignored. Please use non-capturing groups. This typically includes elements like special image tags or escape sequences that need custom handling. Example RegexForIgnoredSubstringWithinText regex (fit for Chinese): (?:\[[^\]]*\])|(?:\{[^}]*\})|(?:\^[\w\d]{9})|(?:[\u4e00-\u9fa5\u3000-\u303F\uFF00-\uFFEF]+)|(?:<color=[^>]+>)|(?:</color>)|(?:<|>)
RequestBatchSize
The total size of the batch data for each translation request. If the translation API indicates that a request is too large, reduce this value.
MaxRetryCount
The maximum number of retry attempts when an error occurs during a translation request.
TranslationCacheCapacity
The maximum cache size for storing translations.
TranslateTextsOfItemTipsMod
Translate the text within the ItemTipsMod.
RegexForItemTipsModTokenizer
A regular expression used for generating tokens from ItemTipsMod. Token is used to handle the automatic line break position of text. Whether to wrap each word or to wrap after each word. Example RegexForItemTipsModTokenizer regex:(?:<color=[^>]+?>|</color>|[a-zA-Z0-9]+|\s+|.)
PresetTranslations
The filename of preset translations. Preset translations reduce translation requests for common texts during game loading. Leave it empty to disable this feature. The preset translations file is a JSON file located in the same directory as the DLL.
OverrideFont
Font used to override the font of the game. Choose according to the target language you need.
FontAssetBundleName
The name of the AssetBundle containing custom fonts. Located in the same directory as the DLL.
CustomDfFontName
The name of the custom DF font to use. Include it within the FontAssetBundle.
CustomTk2dFontName
The name of the custom tk2d font to use. Include it within the FontAssetBundle.
RegexForDfTokenizer
A regular expression used to generate tokens for the DF tokenizer. Tokens help control the automatic line breaks for text. For example, whether to break lines after each character or after each word. Refer to the default example and modify mainly the text-related components. Example RegexForDfTokenizer regex: (?<StartTag>\[(?<StartTagName>(color|sprite))\s*(?<AttributeValue>[^\]\s]+)?\])|(?<EndTag>\[\/(?<EndTagName>color|sprite)\])|(?<Newline>\r?)|(?<Whitespace>\s+)|(?<Text>[a-zA-Z0-9]+|.))
LogRequestedTexts
Log the text requested for translation.
DfTextScaleExpandThreshold
Df TextScale below this value will be expanded. Negative indicates non effectiveness.
DfTextScaleExpandToValue
How much is the Df TextScale below the threshold expanded to.
DfDefaultLabelOverrideHeight
Override height of Df DefaultLabel. Zero means no modification.
DfSimpleStatLabelOverrideHeight
Override height of Df SimpleStatLabel. Zero means no modification.
若默认字体不支持所需语言的字符,可以使用自定义字体。详见GitHub页面。
If the default font does not support the characters required for a specific language, you can use a custom font. For more details, please refer to the GitHub page.