I have an qt quick application that works with a web service
behind code for qml file here I want get list of book
void BookManager::findBook(QString bookName){
QNetworkReply* reply=getRequest("api/Book/Find/"+bookName);
connect(reply,SIGNAL(finished()),this,SLOT(getListFinished()));
}
and here assume that user is not authenticated and must login first and from server i send "First Login and then try again
" .. message to display in client side to user
Here i get the message or book list
void BookManager::getListFinished(){
QNetworkReply* reply=convertToReply(sender());
if(reply->error()==QNetworkReply::NoError)
{
//Display books
}
else
{
readReplyMessage(reply);//Here I get the message and disply it to user
}
}
I want to know how should i create multi-language application?
qStr
and ... is for time that strings are used in UI .
but when i make request from web service ,it will return a string message in English .If user select Persian language how can I translate this string?