[Qt-interest] How to create a .ts file not related to c++ sources ?
Tim Dewhirst
tim at bugless.co.uk
Mon Dec 29 17:01:30 CET 2008
Hello,
Катроевский Алексей wrote:
> I have some constants to be localized but they're not mentioned
> in my c++ sources. I'd like to have a .ts with translation for
> those constants. For example I have a country list in the xml
> file and I want to translate the names according to the current
> language. The point is that I've failed to find how to create a .ts
> without c++ sources. I'm going to use something like:
> QString country = ...;
> QString locCountry = QApplication::translate("myconstants", country);
>
> I can create a .ts file with "myconstants" context manually, but that's
> not convenient for translators who probably even don't know what "xml"
> stands for...
>
> So, is there any smooth way to create a custom .ts file?
In the past I've hacked the lupdate sources to scan for other file
types. It's been a few years (>5) since I did this so I'm not sure if a
better solution exists now but it worked well for me at the time.
Tim
More information about the Qt-interest-old
mailing list