Skip to content

Localization

redegg89 edited this page Feb 19, 2022 · 5 revisions

How it Works

Every line of text is contained in a not-so-special DLL which functions as a variable loader, pretty much. I then build this DLL and reference it in scripts.

How Do I Edit It?

The source can be found here. Just modify what's in quotes based off what's already there or the variable name and you're good! Now all you have to do is run make and make install!

For Advanced Users: You may want to run dotnet build, since that's basically all the makefile does when you just run make.

Is There Language Selection?

Because of how Unity works, as well as how I have it set up, sadly, I don't see a language selection being viable because that would require every language to have every language DLL on every development system, which is almost impossible and would mean a pull request for every new language someone would want to add, whether it be a joke or a real language.

Why Are You Doing it Like This? [Suggestion] Would be a Much Better Way to Do It

My first language was Python, where you could load other python scripts just fine (ahh, one of the perks of interpreted languages) and my very limited knowledge of Unity tells me that I can sort of load C# files using a DLL and they are modifiable independently from the base game. I looked into using separate language files by reading from said file and interpreting that as a bunch of variables, but figured DLLs would be the easier way to handle languages.

Clone this wiki locally