String.truncate() returns a string from the default language only

Started by Pogwizd, Sun 04/10/2020 19:11:39

Previous topic - Next topic

Pogwizd

When working on my demo I noticed that there was sth weird going on with String.truncate(). If the game is run with a non-default language and you are using String.truncate(), it returns the truncated string from the default language, rather than from the language that's selected.
Is that a feature or a bug?

Crimson Wizard

String objects are not translated automatically. Only arguments sent into Say, Display and similar functions are got translated on the fly.

If you need to work with or modify a translated string, you have to first get it using GetTranslation() function.

Pogwizd

Oh, ok. Must have missed it in the in the manual.
Thank you :)

SMF spam blocked by CleanTalk