The same directory
C:\dev\Qt\2010.05\qt\examples\linguist\hellotr
Qt Code:
bool resultLaod=translator.load("hellotr_la"); then the resultLaod=false.To copy to clipboard, switch view to plain text mode
The same directory
C:\dev\Qt\2010.05\qt\examples\linguist\hellotr
Qt Code:
bool resultLaod=translator.load("hellotr_la"); then the resultLaod=false.To copy to clipboard, switch view to plain text mode
Dead easy... I really cannot see the problem
Qt Code:
$ cd /tmp $ cp -r /usr/share/qt4/examples/linguist/hellotr . $ cd hellotr $ qmake $ make $ lupdate hellotr.pro ... Updating 'hellotr_la.ts'... Found 1 source text(s) (1 new and 0 already existing) $ linguist hellotr_la.ts # translate the string $ lrelease hellotr.pro ... Updating '/tmp/hellotr/hellotr_la.qm'... Generated 1 translation(s) (1 finished and 0 unfinished) $ ./hellotrTo copy to clipboard, switch view to plain text mode
thanks
loadReturn=false. So it can translate.Qt Code:
bool loadReturn=translator.load(locale);To copy to clipboard, switch view to plain text mode
Why is loadReturn =flase not true???
mycomputer can't run above commands.
Last edited by nthung; 15th October 2011 at 04:07.
That code doesn't appear in the hellotr example. Anyway, upon reading the friendly manual (QTranslator::load()) I discover that:
What is the value of the variable locale? Does it correspond to a *.qm file?Loads filename + suffix (".qm" if the suffix is not specified), which may be an absolute file name or relative to directory. Returns true if the translation is successfully loaded; otherwise returns false.
Last edited by ChrisW67; 15th October 2011 at 04:51.
nthung (15th October 2011)
Bookmarks