Is is possible to translate texts in xml files used in a c++ program?

Viewed 30

I am working on a multilingual project with wxWidgets, coding in c++. For now, the texts I was translating were all in the cpp files using gnu gettext. Now, I want to use xml files for specific configuration parameters. Among those are different strings to be displayed in multilingual.


Current solution

I design the xml as follows. I declare the strings to be displayed, and I also declare the respective translated strings in the xml. I can then upload them in my program while reading the xml and look in the resulting container for a string depending on the language. But I think this solution is not as elegant as with using gettext.

Do you have better ideas? Am I able to somehow use gettext with xml files on specific nodes?

I thank you in advance for your help.

0 Answers
Related