One of my more long term plans for AutoSite was to get it localized and eventually used in more languages. I’ve worked a little bit on this, and now have a system coming together.
In .NET Winforms, there’s a property you can check to generate localizable code in your project’s .resx files. All that I had needed to do to start making AutoSite translatable was to check it in each form. Now, AutoSite’s .resx files can now be edited for any string (or really, any property as I understand it) on the form.
While I could do localizations all manually in the Resource Localization Editor or Visual Studio if I wanted to, it’s not the most effective workflow nor very intuitive or open for contributors. So I looked into both PoEditor and Crowdin, two options that seem to be popular in the realm of GitHub. I eventually settled on Crowdin, for its completely free tier for open source projects and ability to use machine translations or “TM”s, or translation memory gathered from other projects on the site.
Setup was straightforward and aside from some encoded images (used for the Visual Studio 2017 and Windows XP icon themes) that I needed to hide, it all showed up flawlessly, allowing me, and anyone who would want to contribute, to edit strings for just about any language under the sun.
I already have 100% of the controls translated through TMs, Crowdin’s machine translations and mi Español mal. What this means is that there is something I have to test with and a proof of concept. It’s not.. good tacospeak, probably by any stretch, but it’s something to test with and have open for contributions.
As for when I get to implementation, what’s next? For one, figuring out how to get these translations in the program with a way to switch between them, and additionally hopefully moving strings used for message boxes out of the source code into the .resx file so all of that could be managed from one place, not only for localization but also just in good practice: currently, all of AutoSite’s dialog messages are just in the code, like this:
If MsgBox("AutoSite will create a site in the folder located at " & path & ". Is this OK?", MsgBoxStyle.Question + MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Exit Sub End If
I believe moving this text into the .resx resource files will not only help with translations, but also keeping all the wording consistent and easy to update.
There’s the plan so far; expect more progress updates in the future.