Added separate localization & clean up
About PR
Now localization is separate for server and client!
Media
https://github.com/space-wizards/RobustToolbox/assets/54727692/eecfd2b0-07b8-4178-ba8d-ad3a6b5204a4
Why
Maybe in the context of SS14 it might be, a bit odd, but in the context of a game engine it's a basic function
How it works
All the magic happens thanks to the LocalizationManager.LoadDefault method, it gets the current localization for the server or client from CVars, and loads it. Also for LocalizationManager.AddFunction to work, it returns the loaded CultureInfo.
Now localization is separate for server and client!
Maybe in the context of SS14 it might be, a bit odd, but in the context of a game engine it's a basic function
While this is a necessary part of a full solution and will help with client-side text, note that it doesn't fully fix the client-side localization issue. This is because a lot of the in game text gets resolved by the server into a string using the server's locale, and then that string gets sent to clients. So a lot of the non-UI text that the client will see will still be in another language. A full fix probably requires replacing all of those strings with some kind of struct with the Loc string id & arguments.
Also, fully supporting client side languages still requires the server to provide the resources for the language, and at least for ss14 I'm not sure how any forks will bother actively maintaining multiple languages.
While this PR does add some fairly innocent convenience methods to LocalizationManager, this isn't going to address any of the actual issues blocking different languages between client and server, which Electro already covered.
This can be fine for small games on RT, I guess, but for SS14-based games this isn't helping anything.
While this PR does add some fairly innocent convenience methods to
LocalizationManager, this isn't going to address any of the actual issues blocking different languages between client and server, which Electro already covered.This can be fine for small games on RT, I guess, but for SS14-based games this isn't helping anything.
It's PR for small games, pls do something!!!!
Wow