I18n Guy, your I18n advisor

Example Hebrew Web Page

Prayer: Shema Yisrael

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 fontTimes New Roman Font
Example using the Ezra fontExample using the 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.

To display the Hebrew characters you need an appropriate font. Ezra SIL font shows almost all of the Hebrew characters. Other Hebrew fonts, supporting not only Hebrew characters but punctuation, vowel and cantillation marks, are discussed on Mechon Mamre's font page.

שְׁמַע | יִשְׂרָאֵל, יְיָ | אֱלֹהֵינוּ, יְיָ | אֶחָֽד:

Shema Yisrael Adonai Eloheinu Adonai Echad.

Hear O Israel, the Lord is our God, the Lord is One.

בָּרוּךְ שֵׁם כְּבוֹד מַלְכוּתוֹ לְעוֹלָם וָעֶד.

וְאָהַבְתָּ אֵת יְיָ | אֱלֹהֶיךָ, בְּכָל-לְבָֽבְךָ, וּבְכָל-נַפְשְׁךָ, וּבְכָל-מְאֹדֶֽךָ. וְהָיוּ הַדְּבָרִים הָאֵלֶּה, אֲשֶׁר | אָֽנֹכִי מְצַוְּךָ הַיּוֹם, עַל-לְבָבֶֽךָ: וְשִׁנַּנְתָּם לְבָנֶיךָ, וְדִבַּרְתָּ בָּם בְּשִׁבְתְּךָ בְּבֵיתֶךָ, וּבְלֶכְתְּךָ בַדֶּרֶךְ וּֽבְשָׁכְבְּךָ, וּבְקוּמֶֽךָ. וּקְשַׁרְתָּם לְאוֹת | עַל-יָדֶךָ, וְהָיוּ לְטֹטָפֹת בֵּין | עֵינֶֽיךָ, וּכְתַבְתָּם | עַל מְזֻזֹת בֵּיתֶךָ וּבִשְׁעָרֶֽיךָ:

וְהָיָה אִם-שָׁמֹעַ תִּשְׁמְעוּ אֶל-מִצְוֹתַי, אֲשֶׁר | אָנֹכִי מְצַוֶּה | אֶתְכֶם הַיּוֹם, לְאַהֲבָה אֶת יְיָ | אֱלֹֽהֵיכֶם, וּלְעָבְדוֹ בְּכָל-לְבַבְכֶם וּבְכָל נַפְשְׁכֶם. וְנָֽתַתִּי מְטַֽר-אַרְצְכֶם בְּעִתּוֹ, יוֹרֶה וּמַלְקוֹשׁ, וְאָֽסַפְתָּ דְגָנֶךָ וְתִירֽשְׁךָ וְיִצְהָרֶֽךָ. וְנָֽתַתִּי | עֵשֶׂב | בְּשָֽׂדְךָ לִבְהֶמְתֶּךָ, וְאָֽכַלְתָּ וְשָׂבָֽעְתָּ. הִשָּֽׁמְרוּ לָכֶם פֶּן-יִפְתֶּה לְבַבְכֶם, וְסַרְתֶּם וַעֲבַדְתֶּם | אֱלֹהִים | אֲחֵרִים וְהִשְׁתַּחֲוִיתֶם לָהֶם. וְחָרָה | אַף-יְיָ בָּכֶם, וְעָצַר | אֶת-הַשָּׁמַיִם וְלֹא-יִהְיֶה מָטָר, וְהָאֲדָמָה לֹא תִתֵּן אֶת-יְבוּלָהּ וַאֲבַדְתֶּם | מְהֵרָה מֵעַל הָאָרֶץ הַטֹּבָה | אֲשֶׁר | יְיָ נֹתֵן לָכֶם: וְשַׂמְתֶּם | אֶת דְּבָרַי | אֵלֶּה עַל-לְבַבְכֶם וְעַל-נַפְשְׁכֶם וּקְשַׁרְתֶּם | אֹתָם לְאוֹת | עַל-יֶדְכֶם, וְהָיוּ לְטוֹטָפֹת בֵּין | עֵינֵיכֶם: וְלִמַּדְתֶּם | אֹתָם | אֶת-בְּנֵיכֶם, לְדַבֵּר בָּם, בְּשִׁבְתְּךָ בְּבֵיתֶךָ, וּבְלֶכְתְּךָ בַדֶּרֶךְ, וּבְשָׁכְבְּךָ וּבְקוּמֶֽךָ: וּכְתַבְתָּם | עַל-מְזוּזוֹת בֵּיתֶךָ וּבִשְׁעָרֶֽיךָ: לְמַעַן | יִרְבּוּ | יְמֵיכֶם וִימֵי בְנֵיכֶם עַל הָֽאֲדָמָה | אֲשֶׁר נִשְׁבַּע | יְיָ לַאֲבֹֽתֵיכֶם לָתֵת לָהֶם, כִּימֵי הַשָּׁמַיִם | עַל-הָאָֽרֶץ:

וַיֹּאמֶר | יְיָ | אֶל-מֹשֶׁה לֵּאמֹֽר: דַּבֵּר | אֶל-בְּנֵי | יִשְׂרָאֵל וְאָֽמַרְתָּ אֲלֵהֶם: וְעָשׂוּ לָהֶם צִיצִת עַל-כַּנְפֵי בִגְדֵיהֶם לְדֹֽרֹתָם, וְנָֽתְנוּ | עַל-צִיצִת הַכָּנָף פְּתִיל תְּכֵֽלֶת. וְהָיָה לָכֶם לְצִיצִת, וּרְאִיתֶם | אֹתוֹ וּזְכַרְתֶּם | אֶת-כָּל-מִצְוֹת | יְיָ, וַֽעֲשִׂיתֶם | אֹתָם, וְלֹא תָתוּרוּ | אַֽחֲרֵי לְבַבְכֶם וְאַֽחֲרֵי | עֵינֵיכֶם, אֲשֶׁר-אַתֶּם זֹנִים | אַחֲרֵיהֶֽם: לְמַעַן תִּזְכְּרוּ וַעֲשִׂיתֶם | אֶת-כָּל-מִצְוֹתָי, וִהְיִיתֶם קְדֹשִים לֵאלֹֽהֵיכֶֽם: אֲנִי יְיְ | אֱלֹֽהֵיכֶם, אֲשֶׁר הוֹצֵאתִי | אֶתְכֶם | מֵאֶרֶץ מִצְרַיִם, לִהְיוֹת לָכֶם לֵאלֹהִים, אֲנִי | יְיָ | אֱלֹהֵיכֶם: אֱמֶת

Graphic Of Shema Yisrael

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.

Hebrew Prayer: Shema Yisrael
Easy-to-use Unicode Table for Hebrew Characters (Alef-bet)
Right-to-Left Text in Markup Languages
User Interfaces For Right-to-Left Languages
HTML 4.01 8.2 Specifying the direction of text and tables: the dir attribute
Reading Hebrew Tombstones
Unicode Consortium's Hebrew Code Chart (Acrobat PDF file)
Unicode Consortium's Alphabetic Presentation Forms Code Chart (Acrobat PDF file)
Unicode Consortium's Unicode Standard Annex #9, The Bidirectional Algorithm
I18nGuy's Code Pages At The Push Of A Button.
Jewish Encyclopedia's The Hebrew Alphabet
Judaism 101 Hebrew Alphabet
Jony Rosene's The Hebrew Alphabet
Omniglot's Hebrew Script
Safrus Hebrew Alphabet used in writing STA"M (Sifrei Torah,Tefillin,and Mezuzos)
Boker Tov The Alphabets of Hebrew and Arabic (Japanese site)
British and Foreign Bible Society's The Masoretes and the Punctuation of Biblical Hebrew (PDF) (Nice explanation for each Hebrew character).
Judaism 101 - Shema
Wikipedia - Shema Yisrael
Hebrew Letters - Shema
Jewish Virtual Library - The Shema