An introduction to writing Arabic on the Mac
The following is an attempt to answer questions like "how can I write Arabic on my Macintosh", "how do I get hold of good software for Arabic", and "why doesn't it work like it is supposed to?". It is thus in the format of a "Frequently Answered Questions" ("FAQ"), and I have divided it into two sections:
Part I. How do I get going?
Part II: My trusted old Mac just broke down and they shoved a new one under my nose, so:
Yes and not at all respectively. The "Yes" comes on two conditions:* That you have "activated" the Arabic keyboard layout.
* That you use programs which can make use of Arabic
The first condition is pretty straightforward. It means to make a trip to the settings in System Preferences: Even if Arabic is installed on all Macs, most users will of course not need or want access to it, so you have tell your computer that you are one who does.
The second condition, however, requires a little more care: Not all software that you can put on your Mac is able to handle Arabic text. Unfortunately, that includes the most common word processor of all, Microsoft Word, which for many users is synonymous with word processing. But not for Arabic (or at least not properly). You must therefore, for Arabic purposes, use a program that does work with Arabic text. That can be a "Word equivalent" as the free program OpenOffice, Apple's own word processor, Pages, other commercial programs like NisusWriter, or one of many others. There is much to choose from, but Microsoft is not helpful on the Mac where Arabic is concerned. (Happily, the web is an Arabic-friendly zone, pretty much every available web browser displays Arabic web pages automatically).
In spite of this, we should not be confused: The Arabic capabilities do
not reside in any particular program, they are generic to your computer itself.
It is just that those bad programs are not able to avail themselves of the
Arabic resources that the Mac provides (Arabic fonts, right-to-left writing, character combinations, etc.).
But the menus and everything turn into Arabic?
No, generally not. On computers bought in the West, Arabic is normally just an extra language that is added to the English or European system. If you look in System Preferences : Language and Text (or International), you will see an option to set Arabic as your main language, to be displayed in menus and dialog boxes of the system and programs. But that would require that the program has Arabic menus to be displayed. In fact, I have not seen any program that has that, nor does the Finder or any Apple program, so this is not actually implemented (although a few programs for the Arabic market may have translated their own menus into Arabic). Consider Arabic an added capability to your basically English / European Mac.
That is the point, yes. If you have never written Arabic on a computer before (new student!), these are the basic features which all workable programs share:
You can combine English and Arabic on any line, when you switch to English in an Arabic text, the writing direction changes automatically. It looks funny the first time you see it, but it works correctly, also if there is a line break in the middle of the "other" language. The program should also switch tabs and indents to run from right rather than the left, some also mirror the complete document (page by page).
How do I get started with Arabic?If all you want to do is e.g. to read Arabic web pages, you need not do anything. All existing browsers, including the Safari program on your Mac, displays Arabic text automatically. (*)
If you want to write in Arabic, you must however activate a "keyboard layout", which makes your keyboard produce Arabic characters rather than the English a-b-c. You do this by going to "System Preferences : Language and Text" (older Macs: International) and click on Input Menu ("Keyboard menu").
There you will see a long list of keyboard layouts; scroll down until you find Arabic and check the check box beside it, then close the window.
You will now see a "flag" or "keyboards" menu to the menu bar, with Arabic listed as an option below your national language. Choose it when you want to type Arabic, and suddenly the "a" key will give you a shin.
While you are at it in the "Language and Text" window, go to the Language section. You see that Arabic is not listed in the short list there. Click on Edit list..., then scroll down to "Arabic" and check it there too (‘Arabi will then appear at the top of the short list, move it below your preferred first language). This has no immediate effect, but allows access to certain Arabic resources in some programs, like Mail.
(*) If Safari's Arabic appears to be broken, check here.
What about the keyboard? Where do I get an Arabic keyboard?You don't need a particular Arabic piece of plastic in front of your Mac. The physical keyboard is exactly the same whether English or Arabic characters are painted onto the keys - the electronics inside are identical. When we talk of "keyboards" or "keyboard layouts" we are just talking about software inside the Mac: These are commands that tell the computer that when I press the left-most key on the middle row, it should produce an a - if it is English - or a shin - if it is Arabic. You can even find a funny "Arabic transliterated" layout, which will produce an Arabic alif when the leftmost key on the middle row [the "a" key] is pressed. The regular Arabic keyboard layout, however, follows more or less the established Arabic typewriter standard for what keys produce what characters.
Of course, if you do not touch-type in Arabic, you are typing more or
less blindly until you get so used to this set-up that you remember that
the middle row runs shin-sin-ya'-ba' etc., and you may have to
take a number of trips to the Keyboard Viewer menu to
see where to type (Go to Open International... in the
flag menu, and then check "Keyboard Viewer", it is then added to the flag
Why do I only see each Arabic character separate in some programs?Although your Macintosh has now become Arabized, not all programs are able to display Arabic properly, and not all Arabic fonts work. So, even if Arabic works fine in some programs, you may find that in others there are no Arabic fonts in the Fonts menu (e.g. in Microsoft Word). Or, if you try to type Arabic, you just get European letters. Or, you do actually get Arabic letters, but they run from left to right. Or, they are not joined into words, you just get separate (dis-joined) Arabic characters.
All of these are symptoms that the program you are using does not support Arabic, or the font is not useful. Each issue is different, some you can get around, others not. In brief,
- If the Arabic keyboard menu is dimmed (grey), or you do not get Arabic characters when you type using the Arabic keyboard, it means the program does not support "Unicode", meaning most non-European languages are unavailable. This normally also means the program is very old, it is a fairly uncommon situation today.
- If you cannot see the Arabic fonts (or only "Geeza Pro") in the font list, but you do get Arabic characters when you switch to the Arabic keyboard, it may mean the program has limited support for Arabic. Sometimes, that is close enough so you can use it, often by installing other fonts (see the fonts page), which it will accept. But in many cases, you cannot select a word by double-clicking (it selects the wrong word), or the line breaks up if you try to make changes. Here each program is different, but such programs are at best of limited use for Arabists.
- If Arabic seems to work, except that the characters do not combine into words (they appear in isolate form), check which font is used. The program may be OK, but not the font. There are many (non-Mac) fonts that contain Arabic letters, but not the information the Mac uses to join them up in the correct shapes. This can e.g. happen on some Macs with the font Times New Roman, which Windows users often have as their standard font even for Arabic. If text in this font contains Arabic, it will in older versions appear as disjointed letters. Change the font of that text to a regular Arabic font, and the text may then join up properly (unless, of course, there are other issues also at large). In most cases, Times New Roman's Arabic characters will work fine on current Macs (system 10.5+, that is newer than 2007).
It is rare now to find a current program that does not have any Unicode support at all (although they do exist), but there are still quite a few programs, both large and famous as well as small and dedicated, that do not allow Arabic to function properly for one reason or another. Often, the larger and more complex programs, as well as the programs that have more advanced text editing features (such as desktop publishing) have more things that can go wrong with Arabic, while smaller programs often work fine. However, overall a quick survey of existing text editing and word processing programs shows that "OK" programs outnumber problematic ones by two to one or more.
What about Arabic on the net, in email and web pages?Today, it is almost unthinkable to come across an Arabic web page that does not show up correctly in your browser. It is taken so for granted that the question does not even arise. That in fact, shows the power of standardization, as it was a big problem in the 1990s and even well after 2000. Today, both those who make and those who read Arabic web pages regularly follow a common standard for Arabic text ("Unicode") so that Arabic displays as intended whatever computer you use. If, however, you happen to come across an old Arabic web page where the script does not appear correctly, most browsers have an option called "Character Set" or "Encoding", using this (and choosing e.g. "Arabic (Windows)" or similar) will most often correct the error the page made.
The same mostly goes for email, although there is some old email software around that does not handle Arabic. But real Arabic (not "pictures") is more and more used without problem today. With some exceptions, you can assume that both your software and that of the recipient adhere to the standard, so that emailing in Arabic is as unproblematic as in English. The most notable remaining problem is mailing lists, sometimes the programs that run these cannot handle Arabic, or refuse to do so in deference to readers whose email programs still have problems with such email. (Also, non-western email is often sent in the "html" format, and some mailing lists refuse to accept html postings.)
By and large, however, the Internet has become an Arabic-friendly zone for Mac users just as well as for other computer systems.
What programs do work for Arabic then?
You will find more details on this on the separate pages linked below. But the lowdown is:
- Apple's own free programs, TextEdit, Mail, Safari, etc. are fine (but not its commercial "iWork")
- All web browsers are fine.
- Not really in Microsoft Word for Mac (although you can partly trick it). Some major word processors that do work well with Arabic are Pages (in the AppStore), NisusWriter Pro and Mellel, neither very expensive, as well as the larger "integrated programs" OpenOffice and NeoOffice, both free. Also, most smaller word processors or "text editors" that you can download for free or for a small "shareware" price work well with Arabic.
- In some other program cateories, like page layout, database and graphics, if the large "standard" programs do not support Arabic, they may have "Middle Eastern" variants that specialize in right-to-left languages. Unfortunately, these often come with a hefty price tag. There are however in most cases smaller and less expensive alternatives, some with good support for Arabic, others more basic. As problematic programs are updated, more and more also add Unicode and Arabic support.
- As for fonts, you may want to install more than the ones that come pre-installed. There are almost a hundred free Arabic fonts on the Net for use on any Mac, with most recent Mac systems you can add another 300 for free, and yet more if you want to buy commercial fonts.
Part II: I had to get a new Mac. What is new for Arabic?
What do I have to do to keep working in Arabic?
If you had a Mac from, say, the 1990s, which you used for Arabic, e.g. in NisusWriter, and now have had to replace it, you will find many changes have occured. You can of course still use Arabic, but there are some issues involved.
Your Mac today runs the operating system called "OS X" ("Operating System Ten", introduced in 2001). If your trusty old Mac has been running from the 1990s (or you have taken a break on that other type of computer in the meantime), you will quickly notice that menus and stuff now look different. Not just different, your old programs, such as NisusWriter or WinText will not work under OS X at all. For some years, we could still use these older programs in something called the "Classic environment", and if your last Mac was from the early 2000s, it is quite likely you continued to use good 1990s software on your Mac, in this way. But if that Mac has also been replaced, then you will know that this option no longer exists; in fact, Macs of today cannot run software older than from about 2005.
So, when you get your new Mac now, you will most likely face some transition issues, whether your old Mac was from the 1990s or the early 2000s.
We will deal with each issue in greater detail, starting with the most basic one:
What is that, "Unicode", and how does it relate to typing Arabic?Ah. That is a key concept when working with non-European scripts on computers these days. "Unicode" (for "Universal Character Code") is actually just an agreement between computer makers (a standard) that every character in every possible script and language in the world, dead or alive, is given its own particular number. The computers use these numbers to identify the characters, and thus a Mac and Windows machine will agree on what should be displayed as an alif (before, they also used ID numbers, "character sets", but different ones for Mac and Windows). Unicode is actually no more than that, a piece of paper signed by various computer companies and an international standards board, it is not a program you can install on your machine that does something or such. Thus, computers and applications can choose to apply this standard in their software, or not. Today, basically all computers do, but applications may or may not.
The reason not all do, is that the Unicode standard is based on an assumption: that the computer - and the program - is able to handle large numbers of characters, Unicode gives ID numbers to 65,000 different characters. No individual font will actually contain anywhere near so many characters (I have seen up to 51,000), but the program has to be able to recognize a character with such a high ID number. Old Macs did not; they could only understand character IDs up to 255. Under Unicode, the IDs of the Arabic letters range between number 1,570 and number 1,620. So older applications simply cannot see those characters, they are beyond their horizon.
The Mac systems OS 9 (and OS 8) could in theory work with Unicode, but hardly any program knew how to deal with it. Arabic and other non-European writing was normally handled differently: While Unicode consists of one single character set, with every character in all languages together in sequential numbers, OS 9 could have many parallel character sets ("scripts"), English, Arabic, Hebrew, but each of them restrained to 256 characters (ID numbers), which was ample for each one. Every font on the Mac was linked to one of these scripts; the regular ones to "Latin", and the Arabic fonts to the "Arabic" script. So, when you chose one of the Arabic fonts, the Mac knew that it should switch to Arabic mode, use the Arabic keyboard layout and starting writing from the right to the left - the font choice determined the computer's behaviour. Thus, a font could be either Arabic or Hebrew, but not both, the font had an unambigiuous identity. This setup was called "WorldScript", and was very practical. But Unicode does not work that way.
With OS X in 2001, Unicode was built in, and the Mac departed from the WorldScript system of parallel scripts (although some allowance was made for East Asian and Cyrillic, so these were more available than Arabic and Hebrew). Since Unicode includes all scripts into one huge setup, any font can now contain both Chinese and Arabic characters. Thus, the Mac can no longer determine which script behaviour you want just from the font (even if the font actually only contains Arabic characters, it may contain any other as well, so selecting the Arabic keyboard is separate from selecting the font).
But all Macs with OS X have Arabic, then?Today yes; all Macs do Arabic. But historically it is not quite precise, there was a "gap" between 2001 and 2002 when Macs without Arabic were sold, in system versions 10.0 and 10.1. That actually broke off a long line, Arabic has been possible on every Mac since 1988, except for that one year.
There is a more detailed history of Arabic support on the Mac on the Classic page, but the main milestones were:
How can I upgrade my old Arabic documents to OS X?As you could see from the Unicode paragraph above, OS X actually defines the Arabic characters completely differently from OS 9, although they may use some of the same fonts. That is why opening an OS 9 or Classic document with Arabic text into an OS X program will often stubbornly display the supposed Arabic in Times, and no selecting an Arabic font for it will help: The OS X program cannot understand that the text was in another, parallel script under OS 9, and only displays the characters according to their ID numbers, which were below 256; i.e. as strange European characters. Arabic from Mac OS 9 must therefore go through some conversion to appear properly in OS X programs.
Happily, there are ways. If you have an old (2001 to 2007) Mac with OS X and the Classic environment as well as the old program running on your Mac, you can simply copy and paste through the Clipboard: Copy the text while it is displayed in an Arabic font in a window in Classic (e.g. from old Nisus), and paste it into a window in an OS X program that handles Arabic. The Mac has understood that the origin was Arabic, and pastes the correct characters in the Arabic script, and according to Unicode (and thus automatically in an Arabic font, although probably not the same Arabic font you used originally).
That will not work on current Macs without Classic. There, you must instead tell the modern application that the file you want to open contains old-style Arabic characters and ask it to convert it to modern (Unicode) Arabic. Most word processors let you do this, in slightly different ways:
NisusWriter (Pro and Express) will, when you open an Arabic file from NisusWriter "Classic", automatically convert and present the Arabic correctly, although again perhaps in a different Arabic font. Such documents preserve most (but not all) of their formatting when opened in NisusWriter.
Most text programs allow you to import Arabic "text-only" files written in OS 9 (or in Windows or other systems, see below), through a menu in the Open dialogue box called Text encoding or similar. From this menu, choose "Arabic (Mac)", and the Arabic characters appear correctly. If you do this a lot, you can often also set "Arabic (Mac)" as the default choice for opening plain-text files, so that double-clicking a file will automatically convert it from older Mac Arabic to Unicode Arabic (remember then to save it to "Automatic" or Unicode, otherwise it may be saved back to the older system.)
Generally, this option to "override" the encoding and impose Arabic is only available for plain-text files (without formatting, footnotes, etc.). I have found only one program, Mellel, which also allows it for RTF files, so that you can convert formatted word processing files containing Arabic from Classic. In Mellel, this is under the menu Import: RTF...
That is only useful if your old Mac files were saved as rtf. However, if you used e.g. Nisus Classic, its standard file format was text-only, so you can generally open old Nisus files in any word processor that has an Encoding menu (TextEdit, Mellel, Jedit, etc.). Footnotes and formatting in such Nisus Classic files are lost, however, unless you open the files in modern NisusWriter.
As for converting text-only files, some comments:
Unfortunately, many of the programs used for Arabic in olden days, such as WinText, RavKtav, and others have disappeared with no-one to inherit their format. Files from these programs are often impossible to convert, unless you have access to the original program on an OS 9 machine and can save the files as Text Only in it. You may, however, sometimes be able to open such files (incorrectly labelled "executable Unix") as if they were text-only files, using Arabic conversion as above. The Arabic will then be mixed into a mess of formatting codes. Using e.g. Nisus's "Find: Scripts: AnyArabic" can help separate out the actual Arabic text in such files, although manual clean-up will also be needed.
If you have a text with mixed Arabic and English including European accents, smart quotes or other characters outside basic English A-Z, using the "encoding" method will force Arabic to dominate and these accents will appear as rogue Arabic letters. In that case, you may have to open the old file twice, once under Arabic to get the Arabic text right and once under West European (Mac), to get the accents and smart quotes right, and then copy and paste the correct bits into a joint document.
You may use the same process if you have an RTF or other formatted document containing OS 9 Arabic which the program insists on displaying as Latin characters: Copy the text you know should be Arabic into a separate file, save that as a text-only file in West European encoding, open it again with encoding Arabic (Mac), and paste the converted Arabic back where they should be in the main file.
What about old Word files written in Arabic Windows?We have been lambasting Microsoft Word for lack of Arabic support throughout this page, but here the latest version, Word 2011, will actually work. In this version, they have added some resource that allows it to open documents with Arabic content written in Word for Windows, and not only can you see but you can even edit that Arabic text (see further detail). This should work on Word for Windows files as far back as at least Word 2007, possibly even older.
If you do not have Word 2011, there is an added complexity for old documents that come from Windows. They are often first (mis-)converted from Windows to Mac, not based on their Arabic content, but because of the difference between Mac and Windows "Latin" characters (European accents, mostly). This bungles the Arabic-Arabic conversion, and we must therefore go an extra step to create a file that converts into Arabic:
- In Nisus, TextEdit, and most others, the relevant menus are Open and Save As, in Mellel they are Import and Export. The names of the encodings vary slightly from program to program, "Roman (Windows)" in Mellel and "Windows Only: Western (Latin 1)" in Nisus, for step 2, are the same.
- You cannot use Nisus for step 3, as Nisus does not have Arabic Windows conversion; the others do.
- TextEdit does not let you override encoding in files made by itself for some reason, so if you use TextEdit for step 3, you must use Nisus, Mellel or Jedit for step 1 & 2. If you use TextEdit for step 2, choose Format: Make Plain Text before saving.
- For NeoOffice, OpenOffice and Bean, see the comments in previous section: In the two Offices, the name of a plain-text file you convert should not have the extension .txt; in Bean, it must have that extension. "Show Info" (in Finder) will tell you if the extension is present or not. In Bean you must change the encoding (manually) before you Save As, see above.
- In Jedit, you have to set the default encoding in Preferences: Encoding to "Western (Windows Latin 1)" for step 2, and turn off Sniff Encoding. iText Express works like TextEdit.
- If you cannot see e.g. "Arabic (Windows)" in the TextEdit or Jedit encodings menu, go to Customize Encodings at the bottom of the list.
- For these types of documents,
This process thus, unfortunately, requires making the original Word file into plain-text, losing the formatting information. This is because there is no way to override the encoding conversions (which is what we do here) for Word .doc or .rtf files in any of these programs, only in plain-text files can you do that. (Mellel allows it on import, but not export of rtf files). If you have footnotes, however, both Mellel and Nisus will retain those when you save as plain-text, placing them in the body text (TextEdit and Jedit also do so, but drop the reference number.)
As you can see from the remarks, each program has its own quirks, and the conversion mostly requires a combination of two programs. For an occasional file it does not matter much which, but if you are converting a lot of documents from Arabic Windows to Mac OS X, my choice would probably be to use Nisus for steps 1&2 (creating the plain-text files) and setting up TextEdit for quick conversion of these to Arabic (step 3). Then, if your original Word files had both English and Arabic in the text, copy the converted Arabic bits into their proper place in a second, "English" copy of the original file that did not go through the plain-text route and therefore retains its formatting, in Nisus, Mellel or Neo/OpenOffice.
I used Arabic under OS 9 and I am missing many capabilities in OS X?Partly because Arabic under OS X is limited by Unicode conventions, and partly because Apple had to recreate Arabic support from scratch, it seems, many things we were used to from OS 9 seem to be gone, either for the moment or premanently: