Questions tagged [farsi]

The Farsi tag is for issues relating to Persian (Farsi, فارسی, پارسی) language.

247 questions
108
votes
16 answers

How to convert Persian and Arabic digits of a string to English using JavaScript?

How can I convert Persian/Arabic numbers to English numbers with a simple function? arabicNumbers = ["١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩", "٠"] persianNumbers = ["۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹", "۰"] It is the same schema, but…
S. Ali Mihandoost
  • 2,873
  • 3
  • 18
  • 24
99
votes
12 answers

How to change Gregorian date to Persian date in JavaScript?

Can anyone help me to change Gregorian date to Persian in JavaScript? I want to use it in HTML and JavaScript.
myname
  • 1,159
  • 2
  • 8
  • 9
87
votes
11 answers

Is there any library or algorithm for Persian (Shamsi or Jalali) calendar in Android?

I want to convert Gregorian (western) date to Persian (Shamsi) date and vice versa for all versions of Android. Is there any complete and reliable library or algorithm?
Conscious
  • 1,603
  • 3
  • 18
  • 16
73
votes
4 answers

How to support Arabic text in Android?

I am getting Arabic text from server successfully. Retrieved text I want display in code but its showing boxes instead of Arabic text. Assume that t array values are Arabic text from server. string[] t={" "}; Textview tv = (Textview)…
babi
  • 779
  • 1
  • 6
  • 6
34
votes
13 answers

How to display Persian(Farsi) numbers in views

I want to display Persian(Farsi) numbers on views. For example I calculated a date and converted it to Jalali calendar but how can I display it by Persian numbers?
Farnad Tohidkhah
  • 1,229
  • 1
  • 10
  • 19
17
votes
5 answers

How to comment in a Right to left language in Visual Studio IDE

I want to comment in visual studio in Persian (which is a right to left language) like this: //.برای نگهداری مقدار اولیه ی کالا می باشد value_ متغیر But it seems the code editor does not support RTL languages and reorders the words so the result…
Hosein Masoomi
  • 187
  • 1
  • 10
13
votes
4 answers

.NET How to parse a Persian / Farsi date string (Jalali calendar) into a DateTime object?

I've run across several great code libraries for converting a Persian (Jalali calendar) date to a Gregorian date. However, my original source is a string, not a DateTime object. There doesn't seem to be official support in the .NET framework for…
Dan Bailiff
  • 1,513
  • 5
  • 23
  • 38
13
votes
0 answers

How can I support Farsi (Persian) text in Android?

My users are using Android 2.2 that does not support Farsi fonts. How can I show my Farsi text correctly in Android 2.2 and 2.3?
user1308405
12
votes
2 answers

how to left to right toolbar api 16

I'm using NavigationView and add toolbar with include . I use android:layoutDirection="rtl" and all apis works fine but in api 16 it doesn't work. So how can i left to right toolbar in api 16? drawer_layout.xml
Hamed Karami
  • 405
  • 1
  • 6
  • 28
10
votes
4 answers

How to create PDF containing Persian(Farsi) text with reportlab, rtl and bidi in python

I've been trying to create a PDF file from content that can be English, Persian, digits or a combination of them. there is some problems with Persian texts like: "این یک متن فارسی است" ۱- the text must be written from right to left 2- there is a…
r.aj
  • 399
  • 3
  • 11
10
votes
4 answers

Regex for Persian number

I want to create JavaScript Regex for checking value of textbox in range (U+06F0 to U+06F9) or (0-9) How can I build this?
Hamid
  • 1,948
  • 4
  • 25
  • 38
8
votes
2 answers

How can I dynamically localize text field text-direction depended on user input to rtl or ltr directions

I need a text field which changes its direction based on user input. for example, I have a text field that gets the user input but this input can be sometimes an english text with left-to-right direction and sometimes an arabic text with…
Sajad Abdollahi
  • 1,593
  • 1
  • 7
  • 19
8
votes
5 answers

How can I write Persian language in Android Studio?

I want to write Persian in Android Studio, but after typing Persian, Android Studio shows some strange characters. Of course it was right for about 3 months, but suddenly it's strange.
amir omidi
  • 131
  • 1
  • 8
8
votes
4 answers

How to write unicode character farsi in C++ in ms-dos console?

How to write unicode character farsi in c++ in ms-dos? cout<<"Helo world"<<"سلام جهان";
Samiey Mehdi
  • 9,184
  • 18
  • 49
  • 63
7
votes
1 answer

How can I render a Farsi or Arabic text with connected glyphs in JavaFX

I want to display a text with JavaFX. The message is Farsi or Arabic. However, as described here, the representation shape of a Farsi or Arabic letter depends on its adjacent letters. If I build a TextFlow with a single Text containing the whole…
vahidreza
  • 843
  • 1
  • 8
  • 19
1
2 3
16 17