Flex中的阿拉伯语区域支持 [英] Arabic Locale Support in Flex

查看:198
本文介绍了Flex中的阿拉伯语区域支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我学习如何本地化我的Flex应用程序并支持多种语言。在线教程非常棒。因此,基本上,我使用以下方法在SDK文件夹中创建了阿拉伯语(约旦)语言环境文件:

  copylocale en_US ar_JO 

我导航到本地文件夹,我可以看到在那里的 ar_JO 文件夹...所以我认为一切顺利。



接下来,我遵循教程( www.babelfx.org ),并能够本地化我的测试应用程序的英文,法文和阿拉伯文。点击任何一种语言,将我的简单表格的标签切换成所需的语言...然而:


  1. 当切换到阿拉伯语语言的标签变成空的方形符号。如果你想知道,是的,我可以打开一个记事本,并输入阿拉伯语文本,并成功保存。

  2. 当我输入阿拉伯文本到文本框中,我可以看到我输入的阿拉伯文字正确(标签仍然是方形符号)。

任何想法我可能会在这里丢失??



我试着改变我的应用程序的字体(在应用程序标签上,我将 fontFamily )改为简体阿拉伯语这是默认在Windows上。



感谢

解决方案

我找到了解决方案。实际上,我不需要嵌入任何字体或任何东西来实现它。



我的问题是在资源中的编码。属性文件。我用Notepad ++打开它,然后我注意到 Encoding 菜单。那时候,我还记得读过一些关于资源文件的编码应该是 UTF-8 的内容。所以我把编码从菜单转换成了 UTF-8 ,编译过了,不行!经过几次重试和清理项目,它的工作成功!!!

只是提醒每个人(因为我已经陷入了这个问题,而解决这个问题):
对于 mx 组件,嵌入字体必须将 embedAsCFF 设置为 false


Today, I learn how to localize my Flex application and to support multiple languages. The tutorials on-line are great. However, non of them mention the Arabic locale.

So basically, I created the Arabic (Jordan) locale files in the SDK folder by using:

copylocale en_US ar_JO

I navigated to the locale folder and I was able to see the ar_JO folder in there... So I assume everything went smooth.

Next, I followed the tutorials (www.babelfx.org) and was able to localize my test application in English, French, and Arabic. Clicking on any of those languages switches the labels of my simple form/into the desired language... however:

  1. When switching to the Arabic language the labels turn into empty square symbols. If you are wondering, yes I can open a notepad and type Arabic text and save it successfully.
  2. When I type Arabic text into the text boxes, I can see the Arabic words that I typed correctly (the labels are still square symbols).

Any ideas what I might be missing here??

I tried changing the font of my application (right on the application tag I set the fontFamily) into Simplified Arabic which comes by default on Windows.

Thanks

解决方案

I found the solution. Actually, I didn't have to embed any fonts or anything in order to get it working.

My problem was the encoding in the resources.properties file. I opened it in Notepad++, then I noticed the Encoding menu. At that time, I remembered reading something about that the encoding of the resources files should be UTF-8. So I converted the encoding to UTF-8 from the menu, compiled, it didn't work! After couple of retries and cleaning the project, it worked successfully!!!

Just a reminder for everybody (as I have fallen into this while working this problem out): For mx components, embedded fonts must have the embedAsCFF set to false.

这篇关于Flex中的阿拉伯语区域支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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