如何在黑莓手机上显示其他语言的文本?

发布于 2024-12-04 04:01:19 字数 388 浏览 6 评论 0原文

我想在黑莓 5.0 的应用程序中显示马拉雅拉姆语脚本。我尝试使用以下代码。但它仅显示英文文本。

      try {
         alphaSerifFamily = FontFamily.forName("BBAlpha Serif");
    } catch (ClassNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } 

     Font appFont = alphaSerifFamily.getFont(Font.MALAYALAM_SCRIPT, 9, Ui.UNITS_pt); 
     setFont(appFont); 

I want to show malayalam script in my application in blackberry 5.0.i tried with following code. but it shows text in english only.

      try {
         alphaSerifFamily = FontFamily.forName("BBAlpha Serif");
    } catch (ClassNotFoundException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } 

     Font appFont = alphaSerifFamily.getFont(Font.MALAYALAM_SCRIPT, 9, Ui.UNITS_pt); 
     setFont(appFont); 

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不知在何时 2024-12-11 04:01:19

检查以下链接:

http://yamspog.wordpress.com/2009/08/30/how-to-use-resource-files-in-your-blackberry-app/

http://docs.blackberry.com/en/developers/deliverables/12002/Create_resource_file_for_BlackBerry_Application_655978_11 .jsp

创建完成后资源文件中,使用以下代码检索 KEY 值:

public static ResourceBundle _res = ResourceBundle.getBundle(BUNDLE_ID, BUNDLE_NAME);
_res.getString(yourKey)

Check the following links:

http://yamspog.wordpress.com/2009/08/30/how-to-use-resource-files-in-your-blackberry-app/

http://docs.blackberry.com/en/developers/deliverables/12002/Create_resource_file_for_BlackBerry_Application_655978_11.jsp

When done with creating the ressource files, use the following code to retrieve the KEY value:

public static ResourceBundle _res = ResourceBundle.getBundle(BUNDLE_ID, BUNDLE_NAME);
_res.getString(yourKey)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文