Translation class

Hello.
I made a translation class that I plan to use for a project in the future. Without a doubt, she needs improvement but I don't know how I could do that.
I'm attaching the files, so we can think about improvements together and have a cool class for the translation.

What I liked least was the idea of ​​lots of splits, but I don't know if there would be any other way.

Sorry for my English
Translation class.nvgt (2.4 KB)
translation test.nvgt (362 Bytes)
lang.lang.txt (178 Bytes)

P.S: Remove the .txt from the end of the file, leaving just lang.lang

lots of splits, but I don't know if there would be any other way.

Well, my idea would be using regex expressions to make them more dynamic, like STW's system. I have never been success creating it as I don't have much knowledge on that.

hello. I fixed a small bug I found in the class:
when a text was not translated in the text file it would return the text without replacing the variables. here it is already corrected:
Translation class.nvgt (2.6 KB)

1 Like