Reputation: 21
I have been looking for a while, and the thing is, I need to translate specific text inside a code, he sent it to me in Russian, and I wanted to know if there is a way, to translate the full file, but only translating the Russian parts. For example here.
AddInstructionalStart();
AddInstructionalButton("Следующий режим", 197);
AddInstructionalButton("Предыдущий режим", 196);
AddInstructionalButton("Управление объектом", 194);
AddInstructionalButton("Управление объектом", 195);
AddInstructionalButtonCustom("Увеличить скорость", "t_+");
AddInstructionalButtonCustom("Уменьшить скорость", "t_-");
AddInstructionalButtonCustom("Установить", "t_Y");
AddInstructionalButtonCustom("Отмена", "t_N");
AddInstructionalEnd(1);
Is there an automatic way to do it? Or just suck it up and do it manually?
Thanks!!
Upvotes: 2
Views: 252
Reputation: 36629
Code like this should be rewritten to put any translatable string in one or more separate files. Most often .resx files. That way you can just send the files to a translation agency, and there are various tools that help with translation, If you search a bit you should find some that allow automatic translation with the help of online translation services.
Some refactoring tools allow you to move a string to a resx-file with a simple command, but they still need to be given a name, and that might be difficult if you have no idea what the text means. And you still need to decide which strings are UI-strings, and which are meant for logging or other purposes, and I do not think there is any automated way to do that.
Upvotes: 1