While trying to translate a project, I got the
The message string s
s:= 'The file ' + fname + ' does not exist';
contains two constant strings ('The file ' and
'does not exist');
The simple way would be to define string ressources or constants, which will be translated separately,
with this result:
s:= Ressource[currentlanguage,_THE_FILE] + fname + Ressource[currentlanguage,_DOES_NOT_EXIST];
Now I'm looking for a more advanced way (and easier way for the translator) to solve the problem.
E.g. if one could write all parts together into text-files
(one for each language), and parse the language-dependend file, somehow like this:
FILE_DOES_NOT_EXIST = "The file" + fname + " does not exist";
The constant strings could easily be parsed (e.g. into
a stringlist Parts) and put together.
The problem would be fname, which will be
read as a string, but would have to be converted
into a variable-name. So I would need conversion
from a string to the content of the corresponding
s:= Parts + GetVariableContent(Parts) +
Is there any way to achieve this?
Thanks for help,