简体   繁体   English

QT / QML印地文字体支持

[英]QT/QML hindi font support

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 would not know the equivalent of "Welcome" in Hindi, or any other language for that matter. Qt将不知道印地语中的“欢迎”或任何与此对应的其他语言的含义。 The proper way to add Hindi support to your application would be localization. 向您的应用程序添加北印度语支持的正确方法是本地化。 You could start from QtQuick Internationalization and Internationalization with Qt 您可以从QtQuick国际化Qt 国际化开始

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM