4 ms·
It still frustrates me that there's no built in gettext-style affordances for C#. I guess it doesn't fit the way people typically build software in .NET. IMO th
by kevingadd 2y ago
It still frustrates me that there's no built in gettext-style affordances for C#. I guess it doesn't fit the way people typically build software in .NET. IMO the result is that it's more work to localize your software, so a lot of software that should get localized doesn't.
I built a gettext-style system for my own software, so I feel like it's possible to do. But the gap between that and making something everyone can use is pretty big.
- gwervc 2y agoIt's even more a mess when doing multi-platform. I've a Monogame Android prototype build of my game and somehow the .NET localization throws me exception at runtime. So it's easier to implement a service that load and handle localization than relying on supposed built-in mechanism.
- pjc50 2y agoYou're "supposed to" use string resources. There's support for having a different resource pack per languages. It's not exactly frictionless, though. (With the new "source generator" work it should be relatively straightforward to implement a gettext-style source scan if that's what you want.)
- svantex 2y agoThere's nothing wrong with the .NET resource system with culture-specific satellite assemblies etc as such. The bigger problem I see is lack of tooling and services for translation by non-developers, volunteers, professional translation bureaus etc. You can't expect them to fire up Visual Studio, clone your repo and start editing resx files. Especially as there's not even a translation view! With .po files, there's a ton of editors, online services, translators etc available.
- radnor 2y agoAt a previous job we utilized https://webtranslateit.com/ https://webtranslateit.com/ - it organized everything easily for volunteers to provide translations for all resx strings.
- svantex 2y agoNice, but perhaps a little pricy for small startups. That's actually one of the things I didn't emphasize perhaps. Not only is the gettext/.po eco system big, there's also a lot of free or relatively low cost services available.
- ygra 2y ago> there's not even a translation view With Windows Forms, at least back in the day, you could open a Form in the designer, change its language to something else and just edit text on the controls (or images, etc.). The changes would go into a resx file for the selected language. At first glance this looked quite cool, but on the other hand, translators now can ruin your UI, as there's not really a dedicated translation view that only allows to change resources ...