E2B v1.72+ can support Right-to-Left languages such as Arabic, Hebrew and Urdu and create menus that are aligned to the right. This feature only works correctly with grub4dos 0.4.6a 2015-08-05 and later versions.
Note: Not all character glyphs are supported by the unifont font file loaded by grub4dos – e.g. some Myanmar\Burmese and Hindi characters may not work.
If you want to have the all the menus aligned to the right side of the menu area, you can use:
in your \_ISO\MyE2B.cfg file. For left-aligned text use:
If the correct language option is available, you should also set the LANG variable in MyE2B.cfg. e.g.
if "%LANG%"=="" set LANG=ARABIC
If RTL is set, then menu headings will also be right-justified unless CENTREHD is also set, in which case the menu headings will be centred. If RTL is set to 1 then E2B will use the menuw value (the menu width) for menu heading alignment.
For example, if your menu is 60 characters wide (menuw=60), E2B will set RTL to 60. You can override this by specifying a value for RTL (e.g. 56) – this will adjust the position of the menu headings.
Reversing the glyphs (fribidi)
If you create UTF-8 .mnu files or .txt files, you can use your language glyphs for the title and menu help text. However, depending on what editor you use, you may find that the glyphs come out backwards in the E2B menus.
Tip: If you place the cursor in Notepad in the middle of a glyphic word and press the right-cursor key – if the cursor moves to the left, then the word will come out reversed in E2B/grub4dos. If you press the right-cursor key and the cursor moves to the right, then the glyphs will not be reversed in E2B.
You can use fribidi.exe to reverse the glyphs in .mnu and .txt files. In the \_ISO\docs\E2B Utilities\Fribidi folder, there is a Reverse.cmd script.
Drag-and-drop your .mnu file or .txt file (in UTF-8 encoding) onto it to create a new ‘rev’ file.
e.g. Ubuntu.mnu will be converted to Ubunturev.mnu.
Creating your own language folder
If you wish to create a STRINGS.txt and F1.cfg file in your own RTL language, you can base them on the ones in the \_ISO\e2b\grub\ENG folder. You could use spaces to pad out multiple lines so that they are right-aligned – e.g. to see this format
: (N/Y) sd sd sds dsdsdsd
You would need to make a single line like this:
$$STRabcd= xxxxxxxxx\n ========\n dddddddddddddddddd\n : (N/Y) sd sd sds dsdsdsd
Try a few headings, menu entries and user messages first to check that it is working correctly first! You should be able to use Notepad to create a STRINGS.txt file and then use the Fribidi Reverse.cmd script to convert STRINGS.txt (see above).
For more information see here.