rypervenche Posted February 26, 2019 Share Posted February 26, 2019 Hi all, I feel that this should be pretty easy or straight-forward, however I haven't been able to find anything relevant online so far. I'm working on a translation and for all of the action words my locale swaps the word order. So instead of saying "Examine tree" it would say "Tree examination" (translated of course). What would be the best way to approach this? Am I wrong in thinking that I need to change the order of the output in the function BufferedAction:__tostring() inside of bufferedaction.lua? If so, what would be the best way to make such a change? I tried simply copying the file into my mod and making changes, however my mod doesn't seem to pick up the file. I'm not sure if I would need to call it somehow in my modmain.lua or something. I'm guessing that that is not recommended since I'd be copying an entire file with other functions that could get updated at some point. If anyone could point me in the right direction, I would greatly appreciate it. Thanks a bunch! Link to comment https://forums.kleientertainment.com/forums/topic/103328-change-word-order-for-locale/ Share on other sites More sharing options...
YakumoYukari Posted February 27, 2019 Share Posted February 27, 2019 Try to use string.format Method. There're already many examples in the code. I'd recommend you to look at how 'random' text in the sign would be generated by the code. Is in strings.lua STRINGS.SIGNS = { MENU = { PROMPT = "Write on the sign", CANCEL = "Cancel", ACCEPT = "Write it!", RANDOM = "Random", FILTERING = "Validating Message...", }, ADJ_NOUN_FMT = "{adjective} {noun}", ADJ_NOUN_ADD_FMT = "{adjective} {noun} {addition}", QUANT_ADJ_NOUN_FMT = "{quantifier} {adjective} {noun}", QUANT_ADJ_NOUN_ADD_FMT = "{quantifier} {adjective} {noun} {addition}", QUANTIFIERS = { "Really", "Very", "Quite", "Very Very", "Extremely", "Moderately", "Minimally", "Sort of", "Totally", }, ADJECTIVES = { "Sunny", "Danker", "Dark", "Morose", "Morbid", "Awful", .... Link to comment https://forums.kleientertainment.com/forums/topic/103328-change-word-order-for-locale/#findComment-1159826 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