[Qt-interest] Qt::LayoutDirection and language

Robert Hairgrove evorgriahr at hispeed.ch
Thu May 13 14:19:25 CEST 2010


Robert Hairgrove wrote:
> Diego Iastrubni wrote:
>> Be prepared for everything:
>>
>> http://www.i18nguy.com/temp/rtl.html
>>
>> Also add Yiddish to that list. 
> 
> Good web page, thanks!
> 
> Qt provides enum values for many more languages than can actually be 
> used for locales; at any rate, it seems to default back to the system 
> default locale in all cases where QLocale::countriesForLanguage() 
> returns an empty list (including Yiddish). The day and month names in 
> languages with multiple script possibilities are also usually rendered 
> by the Qt locale functions using the scripts/fonts which are most likely 
> to be installed in the OS (e.g. Latin fonts). And that is all I need 
> this for anyway. I can live with that switch statement!

There is obviously some room for improvement here ... Punjabi is one of 
those languages which can either be written in the Gurmukhi script 
(mostly used in India, written LTR and derived from a script similar in 
appearance to Sanskrit) or in the Shahmukhi script which is written RTL 
in an Arabic-style script and used widely in Pakistan. So the layout 
direction AND the script used would depend not only on the language in 
this case, but on the country as well. However, the localized days of 
the week in Punjabi are rendered by Qt for both countries using the 
Gurmukhi script which I'm sure is a potential issue WRT political 
correctness (source: http://www.omniglot.com/writing/gurmuki.htm)

Also, in the case of languages which have no associated country or 
locale such as Yiddish, at least one script should be well defined.



More information about the Qt-interest-old mailing list