QT/QML印地语字体支持 [英] QT/QML hindi font support

查看:168
本文介绍了QT/QML印地语字体支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建具有印地语字体支持的应用程序.用英语写的文字不显示在印地文中.但是,如果我在印地语中写它,它将显示在印地语中.

I am trying to create an application with hindi font support. Text written in english is not displayed in hindi. But If i write it in hindi it is displaying in hindi.

    FontLoader { id: hindi
    source: "/home/sakshi/development/adt-bundle-linux-x86/sdk/platforms/android-17/data/fonts/DroidSansDevanagari-Regular.ttf";
}

Text{
 x: 149
 y: 348
 width: 428
 height: 44
 text: "\nजोड़े आपको दुनिया से"
 font.family: hindi.name
 }

带有此文本的内容将显示为जोड़ेआपकोदुनियासे

with this text will be displayed as जोड़े आपको दुनिया से

FontLoader { id: hindi;
source: "/home/sakshi/development/adt-bundle-linux-x86/sdk/platforms/android-17/data/fonts/DroidSansDevanagari-Regular.ttf";
}

Text{
 x: 149
 y: 348
 width: 428
 height: 44
 text: "\nWelcome"
 //text: hindi.status == FontLoader.Ready ? 'Loaded' : 'Not loaded'
 font.family: hindi.name
}

在这种情况下,输出为欢迎". 谁能告诉我如何将字体更改为印地文?有什么方法可以将英语翻译成印地文?

in this case output is "welcome". Can any one tell me how to change the font to hindi? Is there any way to translate from english to hindi?

推荐答案

Qt将不知道印地语中的欢迎"或任何其他与此语言等效的内容.向您的应用程序添加北印度语支持的正确方法是本地化.您可以从 QtQuick国际化

Qt would not know the equivalent of "Welcome" in Hindi, or any other language for that matter. The proper way to add Hindi support to your application would be localization. You could start from QtQuick Internationalization and Internationalization with Qt

这篇关于QT/QML印地语字体支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆