This is probably an easy one (it may even be a dupe), but I cannot find answer to this - how to print number using Hebrew letters?
I've tried to change app language and/or using format provider:
myTextBox.Text = 555.ToString(new System.Globalization.CultureInfo("he-IL"));
but I can't get Hebrew letters.
In hebrew we use the same numbers as in english. However, hebrew letters can indicate numbers.
For א
that is 1, ב
is 2 and so on. But after you reach י
which is 10, the next letter is כ
, but it stands for 20. So 11 would be י"א
. (that's the way it's written in hebrew, with the " mark between the letters).
Your next letter would be 30 and so on untill you get to 100, then the next one is 200, 300 and the last letter is 400 (ת
).
The entier hebrew alphabet is:
(note that the hebrew letters are written from right to left, meaning that א
is the first and י
is the last in the first row)
אבגדהוזחטי (that's 1 to 10)
כלמנסעפצ (that's 20 to 90)
קרשת (that's 100 to 400)
(there are some spacial letters with different forms for ending a word, but they have the same numeric value as the regular letter. for example, ך
is the way to write the letter כ
if it's the final letter of a word, but it's still 20 for the numeric value)
So the number 600 may translate to ררר
, or to תר
, or any combination of letters that will sum up to 600. Of course, this may pose a problem for you if you want to translate numbers to hebrew letters.
I would probably go for the shortest combination possible, so test for the highest value letter that can be used recursively until you can sum all the letters you have to the requested number.