kyupita Posted September 29, 2025 Share Posted September 29, 2025 How would I go about adding a setting to change my mod's language to a different one? I'm not too sure where I'd put the translations for things like the select screen or item names, and what else I might need to add to make it show up Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/ Share on other sites More sharing options...
kyupita Posted September 30, 2025 Author Share Posted September 30, 2025 On 9/29/2025 at 1:36 PM, seraph780 said: How would I go about adding a setting to change my mod's language to a different one? I'm not too sure where I'd put the translations for things like the select screen or item names, and what else I might need to add to make it show up I was able to find an easy way to translate my mod, but I now have a weird problem 😕 Everything that has a string in modmain.lua is set up like this, and while it worked for 99% of my mod's text, it's specifically the quotes that for some reason just don't appear Side by side of my mod's selection screen vs wormwood What's going on here? Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837768 Share on other sites More sharing options...
FerniFrenito Posted September 30, 2025 Share Posted September 30, 2025 If you remove the quotes does it work? Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837787 Share on other sites More sharing options...
kyupita Posted September 30, 2025 Author Share Posted September 30, 2025 7 minutes ago, FerniFrenito said: If you remove the quotes does it work? Nope, the quote is still invisible on the select screen Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837788 Share on other sites More sharing options...
DSTUser Posted September 30, 2025 Share Posted September 30, 2025 Is that Sebastian solace from the hit game roblox pressure 1 Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837789 Share on other sites More sharing options...
FerniFrenito Posted September 30, 2025 Share Posted September 30, 2025 2 minutes ago, seraph780 said: Nope, the quote is still invisible on the select screen Maybe that font doesn't support those characters. Do you know if there's a mod that supports that type of characters in that specific part? Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837790 Share on other sites More sharing options...
kyupita Posted September 30, 2025 Author Share Posted September 30, 2025 3 minutes ago, DSTUser said: Is that Sebastian solace from the hit game roblox pressure yes........... 😛😛 1 minute ago, FerniFrenito said: Maybe that font doesn't support those characters. Do you know if there's a mod that supports that type of characters in that specific part? I know the quotes for chinese mods work, but for some reason it won't work for me 😥 Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837791 Share on other sites More sharing options...
FerniFrenito Posted September 30, 2025 Share Posted September 30, 2025 7 minutes ago, seraph780 said: yes........... 😛😛 I know the quotes for chinese mods work, but for some reason it won't work for me 😥 If the text still isn't displayed when you remove the quotes, I assume it's not a problem with the quotes, but with the text. Normally, when a font doesn't support a character, it uses "?" or its "id," so to speak, to simplify matters. However, since "Don't Starve Together" doesn't use fonts, but rather bitmaps, when it doesn't find a character, it may just display an empty box. I'm analyzing mods that have Chinese characters to see what could be going on. 1 Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837793 Share on other sites More sharing options...
kyupita Posted October 1, 2025 Author Share Posted October 1, 2025 Putting this here for other people: The way I added another language to my mod is first by going to modinfo.lua and writing configuration_options = { { name = "setting_name", label = "Language1/Language2", options = { {description = "EN", data = 1}, {description = "JP", data = 0}, }, default = 1, --Defaults to English }, } Then, in modmain.lua below "Assets" and above the select screen strings: TUNING.SETTING_NAME = GetModConfigData("setting_name") For the text you want to translate, you would do something like this (example from my code): -- The character select screen lines if TUNING.SOLACELANG == 1 then STRINGS.CHARACTER_TITLES.solace = "The Saboteur" STRINGS.CHARACTER_NAMES.solace = "Sebastian Solace" STRINGS.CHARACTER_DESCRIPTIONS.solace = "*Urbanshade experiment\n*Merchant\n*Strained" STRINGS.CHARACTER_QUOTES.solace = "\"Stock up while you can.\"" STRINGS.CHARACTER_SURVIVABILITY.solace = "Slim" else STRINGS.CHARACTER_TITLES.solace = "妨業員" STRINGS.CHARACTER_NAMES.solace = "セバスチャン ソラス" STRINGS.CHARACTER_DESCRIPTIONS.solace = "*アーバンシェードの人体実験\n*商人\n*緊張" STRINGS.CHARACTER_QUOTES.solace = "\"できるうちに\n買いだめしておきましょ。\"" STRINGS.CHARACTER_SURVIVABILITY.solace = "スリム" end Where you put "if TUNING.SETTING_NAME == 1 then (Language 1 strings here) else (Language 2 strings here) end To translate speech lines, just make a copy of your already existing one and add your translations, then in modmain.lua just call that file like this: -- Custom speech strings if TUNING.SETTING_NAME == 1 then STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character" else STRINGS.CHARACTERS.YOUR_CHARACTER = require "speech_your_character_language2" end (Found out with the help of FerniFrenito): If you get a similar error with the quotes where it doesn't show up, add a line break or space somewhere in your string (Like\nthis) --Quote won't appear because it's too long STRINGS.CHARACTER_QUOTES.solace = "\"できるうちに買いだめしておきました。\"" --Quote now shows up STRINGS.CHARACTER_QUOTES.solace = "\"できるうちに\n買いだめしておきましょ。\"" 1 Link to comment https://forums.kleientertainment.com/forums/topic/168224-adding-translation-to-character-mod/#findComment-1837812 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now