Questions tagged [arabic]

The Arabic tag is for issues relating to displaying user interfaces and managing data in Arabic written language.

In the localization or internationalization of user interfaces, and/or in the encoding/decoding of text, Arabic languages may present particular issues such as Unicode BiDi support (see also: , ).

Unlike other RTL languages (e.g. Hebrew), Arabic letters are written connected so same letter may have more than 4 glyphs as some combinations have specific glyphs. For example, Arabic text should be in the normalized form before processing (indexing ...) It should be mentioned that Unicode offers different methods for representing arabic letters, not only for the different connected glyphs, but also for vowel signs.

Popular questions related to common Arabic related issues:

Useful Arabic libraries

  • Ar-PHP: A collection of libraries to process Arabic text, such as text normalization, rendering Arabic text on images, etc.
2280 questions
7
votes
2 answers

Change axis text direction to right-to-left

In right-to-left languages such as Arabic and Hebrew, how can I adjust the direction of text for ggplot2 text elements? Note that I'm not talking about alignment (which is controlled by the hjust, but rather the actual direction (the equivalent to…
Adi Sarid
  • 799
  • 8
  • 13
7
votes
5 answers

How to format date into Arabic with English numerals for date and year in JavaScript?

I want the date to be formatted in the following format: date: 2016-12-04 into الأحد، 4 ديسمبر، 2016 But I'm getting the following. The numbers are converted to Arabic numerals. I want the date and year in English numerals: الأحد، ٤ ديسمبر،…
Shebin
  • 111
  • 3
  • 8
7
votes
2 answers

How can I change the (locale) thousands separator in Python to Arabic Unicode separator?

I'd like to change the thousands separator such that {:,}.format(1234) in Python uses a different character. The separator should be '\u066c'. How can I set this without affecting any other locals settings? EDIT: Any other suggestion for a…
Gere
  • 12,075
  • 18
  • 62
  • 94
7
votes
2 answers

Custom Arabic font in iOS

I am trying to make an iphone application that displays mainly Arabic language content. I want to use a custom Arabic font for displaying that content, not the iPhone default Arabic font. I used the following code: - (void)viewDidLoad { [super…
Thursday Moh
  • 71
  • 1
  • 2
7
votes
2 answers

HTML formatting Arabic text letters

I want to color some letters in an Arabic text, for instance this text: إذا ماطمحت إلى غاية that gives me this normal text: So I put some letters in tags to color them: HTML: إذا ماطمحت إلى غاية CSS: b { color:…
Burawi
  • 451
  • 4
  • 16
7
votes
1 answer

read timestamp which is in a different locale

"timestamp_utc": "۲۰۱۵-۱۱-۰۲T۱۸:۴۴:۳۴+۰۰:۰۰" is an attribute in a JSON. How do I parse this date? I tried the following piece of code. try { return new DateTime(dateStr, DateTimeZone.UTC); } catch (IllegalArgumentException e) { …
Karthick R
  • 599
  • 9
  • 25
7
votes
10 answers

How to convert english numbers inside a string to Persian/Arabic numbers in Objective-C?

I have an english string that may or may not have numbers. But i want those numbers to be printed on screen as Persian numbers. For example if NSString *foo = @"a string with numbers 1 2 3;" then output should be a string with numbers ۱۲۳ The code…
Sobhan
  • 1,051
  • 2
  • 13
  • 29
7
votes
2 answers

iOS regular expression arabic

I come from this posts Regular Expression Arabic characters and numbers only How to match arabic words with reg exp? (didn't answer my question) I've tried ^[\p{Arabic} ]+$ and received 'Parse error', reason: 'Invalid escape sequence @ pos 3: ^[\ …
Ted
  • 22,696
  • 11
  • 95
  • 109
7
votes
1 answer

Why do Arabic text breaks into two lines sometimes?

I have seen this weird issue multiple times. For some reason, on Chrome, Arabic text sometimes breaks into two lines in the middle of a word. For example, this url: http://aitnews.com/?p=168010 Here's how it looks on Chrome: An here's how it's…
Louay Alakkad
  • 7,132
  • 2
  • 22
  • 45
7
votes
3 answers

how to convert arabic number to english number

I could convert English numbers to Arabic numbers in Xcode. but now I want to convert Arabic/Persian numbers to English numbers in iOS ... Please guide me about this... This is my code for conversion (English to Arabic) : -…
MmD
  • 2,044
  • 5
  • 22
  • 41
7
votes
2 answers

Retrieving Arabic text from MSSQL NVarchar column

I am making a Library Management System, I am trying to add arabic support in my project but I am facing difficulties as follows, when inserting data in SQL through Query i.e Insert into book_info values(25, N'جاوا',…
MMujtabaRoohani
  • 483
  • 4
  • 19
7
votes
3 answers

Where exactly in the Android OS is text renderred?

Let me first state what I am trying to achieve: To create a patch for the Android OS to enable it to display Arabic/Hebrew correctly. Both of these languages are Right-to-Left (RTL) and their script involves connected letters/glyphs (unlike Latin…
user251949
7
votes
2 answers

Java date time in arabic

How to get arabic date when the user selected language is Arabic and date in english format when selected language is english in spring application ? I tried by setting the default locale to english and arabic based on the request but this doesn't…
Muthu
  • 217
  • 5
  • 16
7
votes
1 answer

Right-to-left Support in Python Networkx and matplotlib

I have tried to draw lexicographic graphs with python33 networkx and matplotlib running on Linux Fedora 19 KDE, 64 bits. When feeding English script as input data, the graphs are drawn well. However, when providing Arabic script as input data, all I…
Mohammed
  • 1,364
  • 5
  • 16
  • 32
7
votes
3 answers

A lighter way of discovering text writing direction

I want to determine the writing direction of a string so that I can render Right-to-Left languages such as Arabic correctly in a CALayer. so I have this method +(UITextAlignment)alignmentForString:(NSString *)astring { UITextView *text =…
Warren Burton
  • 17,451
  • 3
  • 53
  • 73