Delphi XE5 right to left languages don't appear as they should in android

此生再无相见时 提交于 2019-12-17 16:33:58

问题


as the title says , a text from a RTL language like persian or arabic doesnt show well in android for example the word "سلام" shows as "م ا ل س". this problem happens even in text inputs (which i thought they were native and native android textboxes support that) is there a way to fix this?


回答1:


As per LURD's suggestions.
Download and use D.P.F Delphi Android Native Components and/or D.P.F Delphi iOS Native Components.
That will fix the problem in XE7 and prior.
According to the documentation with the Delphi XE8 beta the problem is fixed there as well.

As a last resort (if you feel up to it), someone has taken the effort to patch the XE5 source code to enable BiDi support. See: https://docs.google.com/file/d/0BwumWe43CaijVDRQZzNQbXNSLWc/edit?usp=sharing




回答2:


Lack of Bidirectional and Glyph Shaping support is a known restriction of the FireMonkey platform, on all targets (including Windows and Mac OSX).

We will have to wait for "native controls" for Android as third party components for FireMonkey, as it does exists for iOS - see http://www.tmssoftware.com/site/tmsicl.asp for instance.

I've found this great blog article with source code about Android Native controls for Lazarus/FreePascal which is quite interesting. But this won't work with the "NextGen" Delphi compiler, which is currently going in a diverse direction in respect to FPC (e.g. with the ObjectivePascal mode).

Since it uses native Android controls, it should not suffer from the same restrictions as FireMonkey do.



来源:https://stackoverflow.com/questions/18883356/delphi-xe5-right-to-left-languages-dont-appear-as-they-should-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!