right-to-left

Right To Left Language Bracket Reversed

痞子三分冷 提交于 2019-11-29 14:06:58
I am using a StringBuilder in C# to append some text, which can be English (left to right) or Arabic (right to left) stringBuilder.Append("("); stringBuilder.Append(text); stringBuilder.Append(") "); stringBuilder.Append(text); If text = "A", then output is "(A) A" But if text = "بتث", then output is "(بتث) بتث" Any ideas? Hans Passant This is a well-known flaw in the Windows text rendering engine when asked to render Right-To-Left text, Arabic or Hebrew. It has a difficult problem to solve, people often fall back to Western words and punctuation when there is no good alternative word

LESS combine ruleset into two with different variables

人盡茶涼 提交于 2019-11-29 12:38:09
I'm trying to combine one ruleset into two different rulesets with variable values swapped. Main purpose is LTR/RTL internationalization. Usage: h1 { margin-top: 10px; .directions({ margin-@{left}: 5px; }); } Expected output: h1 { margin-top: 10px; } .ltr h1 { margin-left: 5px; } .rtl h1 { margin-right: 5px; } I was able to get some results with the Passing Rulesets to Mixins function available in Less 1.7 .directions(@rules) { @left: left; .ltr & { @rules(); } @left: right; .rtl & { @rules(); } } The problem is that the @left variable is always set to the last value used in .directions()

What is the status of Right To Left languages on Android?

旧时模样 提交于 2019-11-29 11:53:29
问题 I need to create an application that has strings of many languages, including RTL (right-to-left ) languages. I want to know what is the current status of RTL (Right To Left) support on Android (even on latest API), for example: is it possible to dynamically/statically check if the device's current language is RTL type? I know that it is possible to get the current locale, but i need a more general way to check if the current language is RTL. For example, for English and French it will return

Right-to-Left and Left-to-Right printed nicely

冷暖自知 提交于 2019-11-29 11:52:23
I want it to produce the number next to a word so that I can ask the user to select the word by using the corresponding number. This is my code alt_words = hlst loopnum = 8 for i in range(loopnum): if i < len(alt_words): print('{0}. {1:<20}'.format((i+1), alt_words[i]), end =' ') if i == 0: print('', end=' ') if i + 9 <= len(alt_words): print('{0}. {1:<20}'.format((i+9), alt_words[i+8]), end =' ') if i + 17 <= len(alt_words): print('{0}. {1:<20}'.format((i+17), alt_words[i+16]), end=' ') print('\n'+'-'*80) It produces this The first number of each line gets printed on the left, but the word on

How to set Arabic text to right and English text to left on same label

喜你入骨 提交于 2019-11-29 11:41:02
I learned how to make English and Arabic project from previous question I asked . Same Project at github Now what I did is added a label in this project and wrote "Welcome" . The problem is the layout. When I have English text it is at left side (obviously), but when the Arabic text comes, it should start from right to left. But it is aligned to left only. Any idea how to deal with such case? Below are the screenshots... English Arabic Fahim Parkar Below is what I did... Added fonts in projects folder (english.ttf & arabic.ttf) as shown here . In Localizable.strings added "myFont"="ACS

right-to-left (RTL) in flutter

孤街浪徒 提交于 2019-11-29 11:39:11
问题 I was using Flutter more than a week, and wanted to create an Arabic (right-to-left) app. I was reading Internationalizing Flutter Apps, but it didn't mention how to set the layout direction. So, how to show right-to-left (RTL) layout in Flutter? 回答1: first you must add flutter_localizations package to your pubspec.yml dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter now you have two choices : 1. force a locale ( and direction ) on all devices import 'package:flutter

jQuery.scrollLeft() when direction is rtl - different values in different browsers

大憨熊 提交于 2019-11-29 10:47:10
The scrollLeft property of a div seems to return different values in different browsers when the body direction is rtl. An example can be seen here - http://jsfiddle.net/auVLZ/2/ body { direction: rtl; } div.Container { border: 5px solid #F00; width: 500px; height: 400px; overflow: auto; } div.Content { background-color: #00F; width: 900px; height: 380px; }​ <div id="divContainer" class="Container"> <div class="Content"></div> </div> <br /> <input id="showScrollLeft" type="button" value="Show ScrollLeft" />​ $(document).ready(function() { $("#showScrollLeft").click(function(e) { alert($("div

RTL languages uipageviewcontroller animation

强颜欢笑 提交于 2019-11-29 07:55:21
I know this question is typique and it was asked many times in the forum, but I still cannot solve my problem, so please if any body can help be that would be GREAT :) I am creating a book application in the arabic languages and I need to perform the transitions of the uipageviewcontroller from right to left. And thats all I have to say. One more thing (if I hadn't explain very well my self) I have the exact need as this thread: How to change UIPageViewController direction of paging curl animation but I couldn't manage to make the solution they spoke about, so if someone can explain me or give

Concat RTL string with LTR string in javascript

守給你的承諾、 提交于 2019-11-29 05:21:37
I'm facing trouble in concatenating Arabic string with English string but their order is being messed! I tried + operator and str1.concat(..) but nothing works for me. var a = 'english' var b = 'أ.ب-000082-13' var c = '000004-ر خ-2014.xml' //var myCoolString =a + '\\' + b + '\\' + c; var myCoolString =a.concat("\\",b,"\\",c) document.getElementsByTagName('output')[0].innerHTML = myCoolString; The result was like this: english\أ.ب-000082-13\000004-ر خ-2014.xml The characters your are looking for are \u202A , \u202B and \u202C function wrap_dir(dir, str) { if (dir === 'rtl') return '\u202B' +

android determine if device is in right to left language/layout

六眼飞鱼酱① 提交于 2019-11-29 02:56:58
Is there a way to determine if the device is in a right to left language (something like Arabic) as opposed to something that's left to right (English)? Something compatible with older API levels (down to 10) is necessary SOLUTION i ended up using the xml method in the accepted answer. Farther down the line, i also added the code indicated here for instances where I didn't have access to getResources() Identifying RTL language in Android more info This question still gets a lot of traffic; something else I wanted to point out: When I originally asked this I think it was partially to help