right-to-left

Fix a bi-lingual wrong right to left text

亡梦爱人 提交于 2019-12-11 02:32:25
问题 I hope I can explain the problem correctly! There is a document contains some sentences in both Persian/Arabic and English in Word which is basically written in "left to right" direction and it is shown correctly because the original author has placed the words manually in correct positions. the image below may describe better: 回答1: Please take a look at this blog article which talks about this problem within MS Office products. The treatment of mixed LTR and RTL text actually comes from a

Android - Wrong layout direction when switching RTL vs LTR many times

北城余情 提交于 2019-12-11 02:08:34
问题 When I switch my app language between EN and AR (during runtime) the views behave correctly by moving from the LTR to the RTL but when I start stressing the app by switching languages many times the layout direction become missy and I get RTL elements when the app is supposed to show LTR elements. Sometimes the layout direction is not refreshed anymore. As workaround I have to set the layout direction programmatically for those views. binding.spinner.setLayoutDirection(LocaleUtil.isRtl(this)

IE10 - RTL reversed - how to fix?

六眼飞鱼酱① 提交于 2019-12-11 01:59:54
问题 Can't really understand the problem. For some reason - IE10 presents Hebrew in reversed order. If I use compatibility mode(IE Developer Tools, IE 10 compatibility mode) it works fine... http://www.undergraduate.technion.ac.il/rishum/index.html Tried all sorts of RTL fixes(Css, dir attribute, etc.) 回答1: I'm no expert in RTL, but considering it works in compatibility mode, then in short term try adding <meta http-equiv="X-UA-Compatible" content="IE=5"> In long term (or if that doesn't work) you

android Locale.Builder() doesn't mirror the page in right-to-left locales

懵懂的女人 提交于 2019-12-11 01:00:56
问题 When I use locale = new Locale("ar"); the screen is mirrored in the right way. In order to give the option to set the numeric system, i have to use the Locale.Builder() inserted with lollipop. locale = new Locale.Builder().setLanguage("ar").setRegion("MA").setExtension(Locale.UNICODE_LOCALE_EXTENSION, "nu-latn").build(); The problem is that in this way the screen is not mirrored properly. There is a way, like an Extension, to set the rtl attribute? 回答1: SOLUTION: In order to mirror the screen

How to set default language to Arabic ios swift?

心不动则不痛 提交于 2019-12-11 00:11:14
问题 I'm working on a app that is 2 languages namely english and Arabic. I've written the app in english and then localized the app in Arabic. The App needs to restart when changing the Language. My only question is that how can I set the default language to arabic when installing the app for the first time.I've Tried setting the Language to arabic in Edit schemes section, But it only works for the development build not for the Distribution builds. It may be duplicate question but I've tried and

Language recognition and automatic textbox direction switch

耗尽温柔 提交于 2019-12-10 23:35:27
问题 Say I have a textbox in HTML using the following code: <input type="text" name="text" id="text" /> And my site is intended to be for right-to-left as well as left-to-right languages. That means that I have some textboxes that will be typed in a right-to-left language, but the email textbox, for example, will be left-to-right. My question is not how to declare specific direction using CSS. Please no CSS here. My question is if it's possible to use javascript to automatically detect the

RTL support to custom editext for drawable left

限于喜欢 提交于 2019-12-10 21:42:25
问题 I have an edittext having an image as drawable left with a non-editable prefixed editext but now i wanted to make it to support rtl. Despite my effort I am not able to support rtl. My Custom class is as follows, public class PrefixedEditText extends TextInputEditText { private String mPrefix = "+"; // can be hardcoded for demo purposes private Rect mPrefixRect = new Rect(); // actual prefix size public PrefixedEditText(Context context, AttributeSet attrs) { super(context, attrs); } @Override

Android : preferencescreen right to left

主宰稳场 提交于 2019-12-10 20:23:43
问题 This is the xml file of PreferenceScreen the PreferenceCategory appears RTL as I need, but L other compnents Appear LTR How to make thim RTL ? I tied to follow this link and I added android:supportsRtl="true" to the element in my manifest file but nothing happened ! <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="end"> <PreferenceScreen

Identify and isolate hebrew word with regexp

不打扰是莪最后的温柔 提交于 2019-12-10 17:41:51
问题 I need to parse a hebrew sentence to identify and isolate (so I can wrap them up with 'span' tags) every word in it. I'm first trying without punctuation by identifying the non spaces chars from the spaces chars but still doesn't work: var regex = /(\s)*(\S)+(\s)*/g; any idea? thanks edit: I have already a regular expression that does the job in english, I'm putting it in case it can help to understand what I want to achieve: var regExp = /\b([^\s']+)\b/g, edit2: Adding code example var regex

substr doesn't work fine with utf8

跟風遠走 提交于 2019-12-10 13:54:26
问题 I am using a substr method to access the first 20 characters of a string. It works fine in normal situation, but while working on rtl languages (utf8) it gives me wrong results (about 10 characters are shown). I have searched the web but found nth useful to solve this issue. This is my line of code: substr($article['CBody'],0,20); Thanks in advance. 回答1: If you’re working with strings encoded as UTF-8 you may lose characters when you try to get a part of them using the PHP substr function.