August 2, 2011

kitten kitten
Lab Rat
159 posts

getting locale information from string

 

hi to every one
i have a string in my application that contains language name e.g “persian”,“english”,“arabic”
now i want to get its locale name e.g for “persian” it is “fa” and for “english” it is “en”
how can i get it?

 Signature 

www.kitten.mihanblog.com

2 replies

August 2, 2011

Franzk Franzk
Lab Rat
830 posts

You’ll need either a conversion function or store it as meta data with the displayed string. (I’d prefer the latter).

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

August 2, 2011

kitten kitten
Lab Rat
159 posts

i don;t know how can i use meta date
can you give me an example?

 Signature 

www.kitten.mihanblog.com

 
  ‹‹ Avoiding name mangling in Qt dll      shared vs dynamic libs ››

You must log in to post a reply. Not a member yet? Register here!