qwerjk Posted August 10, 2021 Share Posted August 10, 2021 I am a Chinese mod creator, so my code is full of Chinese. Some friends want me to make an English version. And I tried to do it. Now, I can translate into other languages and take effect(only tried to take effect). But, Only English can't. Can someone help me ? Link to comment Share on other sites More sharing options...
Developer rooks Posted August 12, 2021 Developer Share Posted August 12, 2021 Can you explain in more detail what problem you are running into? The game treats English in a special way -- any strings built directly into the definitions of the game's content (cards, characters, etc.) will be treated as the de facto English translation. If you used Chinese strings, the game will probably treat these as the "english" version. So what you will need to do is to use English strings in the definitions of your content, and instead use a translation file (.po) that contains all the Chinese strings. I believe there are a number of mods that support both English and Chinese, you might use one of those as reference. Good luck! Link to comment Share on other sites More sharing options...
qwerjk Posted August 14, 2021 Author Share Posted August 14, 2021 On 8/12/2021 at 10:40 PM, rooks said: Can you explain in more detail what problem you are running into? The game treats English in a special way -- any strings built directly into the definitions of the game's content (cards, characters, etc.) will be treated as the de facto English translation. If you used Chinese strings, the game will probably treat these as the "english" version. So what you will need to do is to use English strings in the definitions of your content, and instead use a translation file (.po) that contains all the Chinese strings. I believe there are a number of mods that support both English and Chinese, you might use one of those as reference. Good luck! I know that I used Chinese strings, the game will probably treat these as the "english" version. Maybe I should change my expression: I want to adjust some strings of the original game in the "english" version. On 8/12/2021 at 10:40 PM, rooks said: I believe there are a number of mods that support both English and Chinese, you might use one of those as reference. I know there are a number of mods that support both English and Chinese. But they are use english strings in the mod ,and translate into Chinese. But I use Chinese strings in the mod and want to translate into English, because my English is not very good. If I use English in mod, it will cause unnecessary trouble for my maintenance. So, I need some help. The Chinese version The English version Link to comment Share on other sites More sharing options...
Developer rooks Posted August 17, 2021 Developer Share Posted August 17, 2021 When playing under the English language setting, only fonts that support English characters are loaded, so Chinese characters for example will not be displayed correctly. You can possibly try providing an override to the English language settings in your mod's OnPreLoad function, something like this: local function OnPreLoad() Content.AddLocalization { id = "english", name = "English (Notosans)", font_settings = { title = { font = "fonts/notosans_cn_sdf.zip", sdfthreshold = 0.36, sdfboldthreshold = 0.30, sdfshadowthreshold = 0.25 }, body = { font = "fonts/notosans_cn_sdf.zip", sdfthreshold = 0.4, sdfboldthreshold = 0.33 }, button = { font = "fonts/notosans_cn_sdf.zip", sdfthreshold = 0.4, sdfboldthreshold = 0.33 }, tooltip = { font = "fonts/notosans_cn_sdf.zip", sdfthreshold = 0.4, sdfboldthreshold = 0.33 }, speech = { font = "fonts/notosans_cn_sdf.zip", sdfthreshold = 0.4, sdfboldthreshold = 0.33 }, }, default_languages = { "en", }, } end Not sure if that answers your question but hopefully it helps. Link to comment Share on other sites More sharing options...
LaimNoah Posted October 20, 2021 Share Posted October 20, 2021 Thankyou sharing with us its helping me cpstest Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.