Super-Fly-Eagle Posted January 11, 2024 Posted January 11, 2024 (edited) ########## This engine should add a text system, such as id stringname string 0 "a" "aa" 1 "b" "bb" 2 "c" "cc" 3 "d" "dd" …… ##########Folder directory game/languages/en game/languages/cn …… ########## when need ,can set lang directory = "./languages/en" or lang directory = "./languages/cn" the string ID is not change accord the string ID get the Localization string menu_text =str_ID label_text =str_ID dialogue_text =str_ID message_text =str_ID The same string can be reused; ########## Edited January 15, 2024 by Super-Fly-Eagle Quote
Azaezel Posted January 11, 2024 Posted January 11, 2024 we actually do have something along those lines. using head as an example: bandicam 2024-01-11 14-55-14-152.mp4 cliffsnotes: set langTableMod for your over arching language table tracker for a particular text element use textID for assignment define a global variable matching it for a numerical reference write your txt files in the form stringname = string Quote
Super-Fly-Eagle Posted January 12, 2024 Author Posted January 12, 2024 13 hours ago, Azaezel said: we actually do have something along those lines. using head as an example: not work,did the script manual v1.2 still effective? Quote
Azaezel Posted January 12, 2024 Posted January 12, 2024 https://github.com/TorqueGameEngines/Torque3D/blob/33b7cc78030a75395ad87864d8895339b9bf00d5/Engine/source/i18n/i18n.cpp#L72 setCoreLangTable sets the overarching language table. You'll find the helper scripts for swapping languages used in the video https://github.com/TorqueGameEngines/Torque3D/blob/33b7cc78030a75395ad87864d8895339b9bf00d5/Templates/BaseGame/game/data/UI/scripts/utility.tscript#L167-L195 Quote
Super-Fly-Eagle Posted January 13, 2024 Author Posted January 13, 2024 (edited) @Azaezel download the new source,success: TacticKing - D3D11 2024-01-13 21-59-38.mp4 Prevent the refresh function from being deleted and add a new file langs.tscript to refresh langs.tscript ——refresh languageMap.tscript ——record str_id ?4.03 there is a problem :After change some tscript and recompile, the 4 main menus "single play","creat server", "join server", "options"not work ? Insert problem: when insert Chinese ,display garbled characters;chinese insert finish when press space or num ,not keydown Edited January 13, 2024 by Super-Fly-Eagle Quote
Azaezel Posted January 13, 2024 Posted January 13, 2024 We are looking at addressing *some* of that for 4.1, including a rewrite of the frontend UI protocols to be somewhat less programmatic. If you'd care to evaluate https://github.com/TorqueGameEngines/Torque3D/tree/development to see if that resolves the issue, or at least seems to be a step forward in that regard, it would be appreciated. Quote
Super-Fly-Eagle Posted January 14, 2024 Author Posted January 14, 2024 (edited) @Azaezel current situation :can show chinese,input displays garbled characters code-file encoding and console code page ,Test show : Edited January 15, 2024 by Super-Fly-Eagle Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.