I am often asked for examples of how to produce a Web page for bidirectional languages such
as Hebrew or Arabic. This page contains one of the central prayers in the monotheistic Jewish religion, known as Shema Yisrael (or Shma Yisrael). It is named for
the opening two words. The prayer declares that there is one and only one God.
The page displays properly on modern browsers, providing you have a good quality Hebrew font. On poorer quality fonts, the spacing of the vowels
and other characters may not be esthetic. For example, the following table compares the Ezra font with the Times New Roman font.
The Meteg vowel " ֽ "
moves between two characters rather than aligning under the character "ח".
Ezra font | Times New Roman Font |
---|---|
Look at the source for this page, to see how it is implemented. I specified in the style section, some fonts that I have that
support Hebrew followed by some more traditional fonts.
I also specified the right to left direction with the CSS command "direction:rtl" for elements with the class = "he".
I entered the Hebrew characters in an editor that supports Unicode UTF-8. For example, Microsoft Notepad.
When you view the source, you will note that the characters are in a different order than when they are displayed on the Web page.
This is because the editor (unless you instruct it to do otherwise) defaults to a Left to right direction. The Hebrew characters will flow right to left, but punctuation and some
other characters that are not strongly right to left, may assume a left-to-right ordering. Of course, English characters (as used in HTML elements) are strongly left-to-right.
Move your cursor thru the Hebrew and English text (for example where I use the span="nobrk" to prevent a linebreak in the middle of a hyphenated word) and don't think about
left and right, but moving forward (with the cursor arrow) through the text.
For more details, see the Unicode Bidirectional Algorithm.
In creating this page, I looked in several prayer books and noted differences. The consonants and vowels were the same, but punctuation varied.
Not all the prayer books used the
Paseq "|" character. There were additional commas "," in some versions, and the character
Sof Pasuq "׃" and semi-colon ";" would be replaced by period "."
and comma "," respectively.
Note that since this text is a prayer and references the name of God, if you print this page, you are expected to treat it respectfully.
Hear O Israel, the Lord is our God, the Lord is One.
וְאָהַבְתָּ אֵת יְיָ | אֱלֹהֶיךָ, בְּכָל-לְבָֽבְךָ, וּבְכָל-נַפְשְׁךָ, וּבְכָל-מְאֹדֶֽךָ. וְהָיוּ הַדְּבָרִים הָאֵלֶּה, אֲשֶׁר | אָֽנֹכִי מְצַוְּךָ הַיּוֹם, עַל-לְבָבֶֽךָ: וְשִׁנַּנְתָּם לְבָנֶיךָ, וְדִבַּרְתָּ בָּם בְּשִׁבְתְּךָ בְּבֵיתֶךָ, וּבְלֶכְתְּךָ בַדֶּרֶךְ וּֽבְשָׁכְבְּךָ, וּבְקוּמֶֽךָ. וּקְשַׁרְתָּם לְאוֹת | עַל-יָדֶךָ, וְהָיוּ לְטֹטָפֹת בֵּין | עֵינֶֽיךָ, וּכְתַבְתָּם | עַל מְזֻזֹת בֵּיתֶךָ וּבִשְׁעָרֶֽיךָ:
וְהָיָה אִם-שָׁמֹעַ תִּשְׁמְעוּ אֶל-מִצְוֹתַי, אֲשֶׁר | אָנֹכִי מְצַוֶּה | אֶתְכֶם הַיּוֹם, לְאַהֲבָה אֶת יְיָ | אֱלֹֽהֵיכֶם, וּלְעָבְדוֹ בְּכָל-לְבַבְכֶם וּבְכָל נַפְשְׁכֶם. וְנָֽתַתִּי מְטַֽר-אַרְצְכֶם בְּעִתּוֹ, יוֹרֶה וּמַלְקוֹשׁ, וְאָֽסַפְתָּ דְגָנֶךָ וְתִירֽשְׁךָ וְיִצְהָרֶֽךָ. וְנָֽתַתִּי | עֵשֶׂב | בְּשָֽׂדְךָ לִבְהֶמְתֶּךָ, וְאָֽכַלְתָּ וְשָׂבָֽעְתָּ. הִשָּֽׁמְרוּ לָכֶם פֶּן-יִפְתֶּה לְבַבְכֶם, וְסַרְתֶּם וַעֲבַדְתֶּם | אֱלֹהִים | אֲחֵרִים וְהִשְׁתַּחֲוִיתֶם לָהֶם. וְחָרָה | אַף-יְיָ בָּכֶם, וְעָצַר | אֶת-הַשָּׁמַיִם וְלֹא-יִהְיֶה מָטָר, וְהָאֲדָמָה לֹא תִתֵּן אֶת-יְבוּלָהּ וַאֲבַדְתֶּם | מְהֵרָה מֵעַל הָאָרֶץ הַטֹּבָה | אֲשֶׁר | יְיָ נֹתֵן לָכֶם: וְשַׂמְתֶּם | אֶת דְּבָרַי | אֵלֶּה עַל-לְבַבְכֶם וְעַל-נַפְשְׁכֶם וּקְשַׁרְתֶּם | אֹתָם לְאוֹת | עַל-יֶדְכֶם, וְהָיוּ לְטוֹטָפֹת בֵּין | עֵינֵיכֶם: וְלִמַּדְתֶּם | אֹתָם | אֶת-בְּנֵיכֶם, לְדַבֵּר בָּם, בְּשִׁבְתְּךָ בְּבֵיתֶךָ, וּבְלֶכְתְּךָ בַדֶּרֶךְ, וּבְשָׁכְבְּךָ וּבְקוּמֶֽךָ: וּכְתַבְתָּם | עַל-מְזוּזוֹת בֵּיתֶךָ וּבִשְׁעָרֶֽיךָ: לְמַעַן | יִרְבּוּ | יְמֵיכֶם וִימֵי בְנֵיכֶם עַל הָֽאֲדָמָה | אֲשֶׁר נִשְׁבַּע | יְיָ לַאֲבֹֽתֵיכֶם לָתֵת לָהֶם, כִּימֵי הַשָּׁמַיִם | עַל-הָאָֽרֶץ:
וַיֹּאמֶר | יְיָ | אֶל-מֹשֶׁה לֵּאמֹֽר: דַּבֵּר | אֶל-בְּנֵי | יִשְׂרָאֵל וְאָֽמַרְתָּ אֲלֵהֶם: וְעָשׂוּ לָהֶם צִיצִת עַל-כַּנְפֵי בִגְדֵיהֶם לְדֹֽרֹתָם, וְנָֽתְנוּ | עַל-צִיצִת הַכָּנָף פְּתִיל תְּכֵֽלֶת. וְהָיָה לָכֶם לְצִיצִת, וּרְאִיתֶם | אֹתוֹ וּזְכַרְתֶּם | אֶת-כָּל-מִצְוֹת | יְיָ, וַֽעֲשִׂיתֶם | אֹתָם, וְלֹא תָתוּרוּ | אַֽחֲרֵי לְבַבְכֶם וְאַֽחֲרֵי | עֵינֵיכֶם, אֲשֶׁר-אַתֶּם זֹנִים | אַחֲרֵיהֶֽם: לְמַעַן תִּזְכְּרוּ וַעֲשִׂיתֶם | אֶת-כָּל-מִצְוֹתָי, וִהְיִיתֶם קְדֹשִים לֵאלֹֽהֵיכֶֽם: אֲנִי יְיְ | אֱלֹֽהֵיכֶם, אֲשֶׁר הוֹצֵאתִי | אֶתְכֶם | מֵאֶרֶץ מִצְרַיִם, לִהְיוֹת לָכֶם לֵאלֹהִים, אֲנִי | יְיָ | אֱלֹהֵיכֶם: אֱמֶת
In case you don't have an appropriate font or a browser that supports bidirectional languages or Unicode UTF-8 properly, here is a (slightly reduced) graphic image of the above text in IE 6.0 using the Ezra font.
Copyright © 2005 (תשסה) Tex Texin. All rights reserved.
Top of page