I have already built a few multilingual systems and sites, and in the tools I knew there seems to be a tendency to use string in the original language of the application (usually English) p>
For example, in a POT file of gettext
:
msgid "My name is %s.\n"
msgstr "Meu nome é %s.\n"
In this way, with gettext
, a hypothetical code should be changed from
printf("My name is %s.\n", nome);
for
printf(_("My name is %s.\n"), nome);
The gettext
even has a tool that scans the code by looking for calls of the _
function, and generates the POT file in the format above, just missing the translated text.
Tutorials of other tools often induce similar practices. But the use of this kind of solution has already caused me many problems. Here in Stack Overflow itself in Portuguese, for example. Whenever any text is changed in the English original, a new pending translation appears no Transifex , without any reference to the previous version of the original or the translation itself. This causes a lot of duplicate work, a lot of inconsistency, and potentially a lot of translated and unused text (because it has been out of date).
It seems to make more sense to use more meaningful names like dictionary keys, for example "CloseLinkText"
or something like that. However it is very rare to see anyone recommending this, or even seeing software that uses this type of key.
Questions
-
Is there any good reason to disseminate this practice of using English strings as keys?
-
In short, why do so many internationalized systems turn translation work into a nightmare? Is not there a better alternative?