RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Added separate localization & clean up

Open TornadoTechnology opened this issue 1 year ago • 3 comments

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.

TornadoTechnology avatar Jun 11 '24 05:06 TornadoTechnology

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.

ElectroJr avatar Jun 11 '24 06:06 ElectroJr

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.

PJB3005 avatar Jun 11 '24 06:06 PJB3005

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!!!!

TornadoTechnology avatar Aug 03 '24 11:08 TornadoTechnology

Wow

TornadoTechnology avatar Apr 02 '25 23:04 TornadoTechnology