[Interest] Qt4.8.5 Internationalization

Konrad Rosenbaum konrad at silmor.de
Thu Jan 16 19:14:36 CET 2014


Hi,

On Thursday 16 January 2014, Ramakanthreddy Kesireddy wrote:
> Am using Qt4.8.5 on embedded linux  with widget based application.
> I would like to know if I need to add support for different languages, do
> I need to maintain different ts files or only English ts file in my
> source code.

It depends.

You usually embed the English text directly in your program, so you do not 
need any ts file for English (unless you decide later on that you want to 
support another dialect of English).

Note: you could chose another language for direct embedding in your program, 
but English is usually understood by more people (read: by more programmers 
and translators) than any other language (except Chinese perhaps).

The ts files exist so you can translate the English text into another 
language. You maintain one ts file for each language that you want to 
support.

The ts files (XML) in turn are compiled into binary qs files that you 
deliver with your program. The qs files are smaller and more efficient.

> Is there any tool that does the translation into different languages and
> generate ts files?

You use several tools from Qt:

lupdate: scans your source files and finds the embedded text, moves it into 
the ts files (updating them with fresh text, but keeping all the old text).

linguist: a GUI that you use to do the translation work. It is not an 
automatic translator - unfortunately we are not there yet: computers have a 
horrible understanding of human language. So you have to do the translation 
work yourself - or better: get some colleagues who are "better with 
languages" to do the work for you (they do not need to be programmers).

lrelease: compiles the completed ts files into qs files.

> Please let me know the localization procedure in Qt4.8.5

There are some nice tutorials for translating:
http://qt-project.org/doc/qt-4.8/linguist-manual.html

Get yourself a big cup of coffee (or tea), lean back, read through it - 
it'll probably answer more questions than you knew you should have... ;-)



	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 588 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140116/01636468/attachment.sig>


More information about the Interest mailing list