Localization System - Part 3 - Localization Update
Author: cevozby,
published 8 months ago,
We came to the most challenging part of localization. Translating messages.
It works the same as dynamic texts, messages are also dynamic. For example, in a battle result message, there are values that can change according to the battle, and translation can be done by assigning arguments accordingly. So far, it works like the system I have done with dynamic texts. After that, the troublesome process started, the save&load system...
[h2][b]Before the localization system[/b], [/h2]
I was saving the messages as follows:
[list]
[*] I created a script called MessageData
[*] Take the string value in the header and save it
[*] Get and save the string value in the content section
[/list]
This way I save each message in MessageData and then pull it from this folder when I want to upload it.
[h2][b]But how can I save in a constant way for values that can change continuously? [/b][/h2]
I did some research on this, but unfortunately, I couldn't find anything useful in most of them. Mostly everyone discussed about constant and dynamic text, but not much about saving with JSON. So I opened the topic myself and someone from Unity wrote me a reply. With a little help from him and some tinkering on my own, I came to a conclusion.
[h2]So what did I do?[/h2]
I saved each of our message drafts to the localization system, then in the MessageData section I kept the key and argument for the header, key and argument for the content, and set the argument to string[] so that it doesn't have problems when saving.
Apart from messages, I also needed localization for the calendar system, but I was able to easily handle this by using Unity's own Calendar system.
[h2][b]Localization Finished[/b][/h2]
We've come to the end of this system, I've been working on the localization system lately and it's finally time to announce it. The localization system is finished and now we will open the localization system to you players with an update.
Apart from that, the date error in the battle results section of the Inbox system has been fixed.
Note: At the moment our game only supports English and Turkish languages, we will start working on Italian and Chinese. If you want to support us in any language, you can contact us. (We do not want to offer basic Google translation.)