151
Developer's Corner / Re: Silly question about localizing C/C++ applications
« on: January 03, 2012, 02:26 PM »
There always are resource DLLs. I believe Microsoft still recommends them. They contain string tables (numeric_id=>"string value") and also dialog resources (allowing you to rearrange controls if they do not fit). You can have multiple different translations for the same phrase and you can have larger labels on dialogs if they are needed in a translation, you can have even different pictures or accelerator tables. Accessing the resources is fast. It all works perfectly - on the paper.
I have used resources DLLs in the past, but I have switched to a gettext-like method few years ago and it was the right move. With resource DLLs, you need specialized expensive software to do the translation, there are problems with updates and patches. Users are unable to contribute. I had people offering help with translation and had to turn them down, because the process was too complex.
With gettext-like method, there are limitations, but there are also results. My application was translated to multiple languages year after I made the switch. Granted, the translations were not perfect, but I bet the users are very happy they have a localized application with few weak points instead of just English app. If you are a one-man software shop, I would definitely stick with gettext or something very similar. If you have a lot of money to spend on a professional translation service and a long release cycle, you may want to try another, "more perfect" method.
Also, I would not worry about speed with a gettext method. If you put the strings in a map, it will be fast enough with thousands of strings.
I have used resources DLLs in the past, but I have switched to a gettext-like method few years ago and it was the right move. With resource DLLs, you need specialized expensive software to do the translation, there are problems with updates and patches. Users are unable to contribute. I had people offering help with translation and had to turn them down, because the process was too complex.
With gettext-like method, there are limitations, but there are also results. My application was translated to multiple languages year after I made the switch. Granted, the translations were not perfect, but I bet the users are very happy they have a localized application with few weak points instead of just English app. If you are a one-man software shop, I would definitely stick with gettext or something very similar. If you have a lot of money to spend on a professional translation service and a long release cycle, you may want to try another, "more perfect" method.
Also, I would not worry about speed with a gettext method. If you put the strings in a map, it will be fast enough with thousands of strings.