Potential support for localization
After the last mammoth update to Gif Animator, I wanted a task that was slightly distracting rather than just fixing bugs. A couple of requests in the past have been about localization, so I had a look at the metrics we have gathered on software usage to see what different languages were being used.
The vast majority of sessions for all our products (around 70%) used English, followed by a variety of other locales, the top four being French, Chinese, Spanish and Russian (around 20% for those four) with the final 10% in a long list of other languages. So, well worth taking a look at localization!
The first task was to identify strings. In a typical application there's going to be an awful lot of them, and Gif Animator is no exception. Of course, a lot of those aren't valid targets for localization, things like control names, command line arguments, file names - all sorts of things that don't need to be included. I wrote a tool to scan our source code and pull out as many valid strings as possible.
The screenshot shown above shows the output being ran on just Gif Animator's core libraries. Even with all the "best guess" exclusions it has made, that's still a lot of strings to look at. And it doesn't even cover the entire software. This may take some time...
The next problem is translating the strings. In one respect, it's quite simple - use a web service such as Microsoft Translate or Google Translate and you're good to go (I haven't looked into Googles offering, but Microsoft give you 2 million characters of free translations via their API and is well worth a look).
Unfortunately automatic translation isn't as awesome as it might first appear.
Part of the problem is while the translation tools are remarkable pieces of code, they aren't 100% accurate. Just comparing a screenshot of the File menu for Notepad in German shows that the translations don't match, perhaps to do with the different contexts. For example, Exit is listed as Beenden in the screenshot but Ausfahrt in the automatic translation.
The fact that translations are possibly inaccurate is only one problem, during the course of experimenting with localization I've identified a few others. Perhaps if you are a skilled translator you already know the answers to these, I certainly don't!
Power users will be used to certain standard key combinations, for example Alt+F, X to exit an application. At least, that's a standard key combination for English locales. Referring back to my German example, that combination now changes to Alt+D, B.
Originally I had planned to try and mirror accelerators. But if File in German is Datei... well, there's a distinct lack of a F. I could try and auto detect, and use the first free letter, but again that's going to cause problems. For example, my screenshot shows that Format in German is still Format and (in Notepad at least) the accelerator remains the same - O. But if I was to use automatic accelerator calculation, then it would end up as F as there's no other top level menu starting with F.
So, there's one problem, and a remarkably frustrating one.
The next problem I identified is related to the first. Again, power users will frequently make use of short-cut keys, such as Ctrl+N to create a new document. The convention of these is widespread. But what about short-cuts for text that is different. For example, formatting something as bold. In many editors, this is Ctrl+B. However, if I ask Google Translate for Bold in German... it gives a lot of results. And not one starts with a B. Do you keep the Ctrl+B shortcut or do something else?
Either of the above issues could be infuriating for an end user, to have application text displayed one way, yet keyboard support that is at odds with other applications.
The final problem is one of layout. The screenshot in the previous section section shows the program we're using to do automatic translations. One thing is very apparent - some of the translations are much longer than their English equivalents. This means overlapping text and controls in the UI. Again, something else that is bound to annoy an end user!
Another issue that I haven't even began to investigate would be right to left layouts which is probably going to be quite problematic to address.
Does it work though?
With the caveats of the issues mentioned above, it actually does work. The below image shows Gif Animator running with a in-progress Russian translation.
It's very incomplete - only bits of the UI have been translated, not one of the menu items has an accelerator, some strings are missing from the packed language file and I haven't even began to look at localizing messages and the other libraries used by Gif Animator. Also, I haven't a clue what any of it says. It might be accurate, or it might be deeply insulting.
It's going to be quite a challenge!
The next update to Gif Animator will (probably) include some of these draft language files. However, without community support to improve the files it may not be a perfect experience and therefore subsequently dropped. We can fix technical issues (and do some digging into how accelerators and short-cuts are handled in other languages), but hiring professional translators is unfortunately not possible.
Ultimately, I'm sure the software would be more useful to end users if it "spoke their language" so hopefully this experiment will work out.