Language

Tip: Use the \_ISO\E2B_Editor.exe utility to make a \_ISO\MyE2B.cfg file.To remove the Blue 5-second banner – see eBook #1.

Summary

  • The E2B Main menu heading (HEADING) and the menu foooter help text (HELPTEXT) and their positions can be set in the user’s \_ISO\MyE2B.cfg file.
  • All other text, e.g. sub-menu headings, E2B menu entries, user prompts, F1 help menu text, various messages, etc. are set in E2B the language files.  e.g. use this line in \_ISO\MyE2B.cfg file to change the language to Spanish:
    if “%LANG%”==”” set LANG=SPANISH
    to use the \_ISO\e2b\grub\SPANISH\STRINGS.txt and F1.cfg files. Other supported languages are in separate folders under \_ISO\e2b\grub.
  • If you want to change the pre-set E2B menu text or prompts, you must create your own ‘language’ by copying the existing language files and then modifying them to make your own ‘language’. See below for details.

Main menu heading and menu help text

The Main menu heading (HEADING) and the Footer help text (HELPTEXT) can be changed by creating a \_ISO\MyE2B.cfg configuration file (you can copy the Sample_MyE2B.cfg file or use the E2B_Editor.exe utility) and changing these two entries (\x20 = space character and is only required if you want a space as the first character): 

set HEADING=\x20 EASY2BOOT - MAIN MENU  (%VER%) %B64%

Use the HEADPOS variable to adjust the position of all menu headings YYXX (default = set HEADPOS=0000).
Use set CENTREHD=1 to centre all headings.
Use \x20 to add the first space character if required. 

set HELPTEXT=HDD0 [F7]   Back [F8]   Reboot [F9]   Power Off [F10]  (%^LANG%)

Use the HBTM variable to adjust it’s position. e.g. set HBTM=3502 for the 36th line down and the 3rd character position across. HEADPOS and HBTM affect all menus. Set these outside of the screen area if you don’t want them to be displayed (e.g. set HEADPOS=4700). 

Variables

These variables can be used in the Main menu heading or the footer help text, and only in the MyE2B.cfg file (*asterisk indicates that they can also can be used elsewhere). 
%VER% will be replaced by the Easy2Boot version – e.g. 1.78*
%@DATE% will be the current BIOS date e.g. 2016-02-08*
%@TIME% will be the current BIOS time, e.g. 14:32:23*
%B64% will display the amount of usable BIOS system RAM and the CPU type – e.g. [3328MB 64-bit]
%^LANG% is the current language (only use in HELPTEXT, do not  use in HEADING as it won’t work reliably)*
%day%%month%%year% – numerical values, e.g. 28 03 2016 (v1.78+)
%SIZE_E2B% – size (GiB) of hd0 which is usually the E2B USB drive as reported by the BIOS (v1.98+)
%SIZE_HD1% – size (GiB) of hd1 which is usually the first internal drive as reported by the BIOS (v1.98+)  

\xnn can be used for any ASCII character (e.g. \x24 for $) , 
\Xnnnn can be used for any Unicode character (e.g. \X00DC for Ü).
\n can be used in HEADING to throw a new line.
\\n can be used in HELPTEXT to throw a new line. 

Display disk sizes

If you want to display the size of the USB drive and the first hard disk in the system, you can also use this code in the \_ISO\MyE2B.cfg file instead of using %SIZE_E2B% and %SIZE_HD1%:

# set SIZE_E2B and SIZE_HD1 for user
errorcheck off
geometry (hd0) > (md)0x333+1 ;; cat --locate=/512 --replace=\x00 (md)0x333+1 > nul ;; cat --locate=nt/Size= (md)0x333+1 > nul
set /A a=%?%+8 > nul ;; cat --skip=%a% (md)0x333+1 | set a= ;; set /a a=%a%>>21 > nul
if %a%<=0 set a= ;; set SIZE_E2B=%a%
geometry (hd1) > (md)0x333+1 ;; cat --locate=/512 --replace=\x00 (md)0x333+1 > nul ;; cat --locate=nt/Size= (md)0x333+1 > nul
set /A a=%?%+8 > nul ;; cat --skip=%a% (md)0x333+1 | set a= ;; set /a a=%a%>>21 > nul
if %a%<=0 set a= ;;  set SIZE_HD1=%a%
set a=

set HEADING=EASY2BOOT – MAIN MENU %B64% USB=%SIZE_E2B%GB HDD1=%SIZE_HD1%GB %VER% 

Disk sizes are actually in GiB. Note: for grub4dos batch file language, when two % signs occur together, we must add a third one e.g. %A% %B% is OK, but %A%%B% is incorrect – we must use %A%%%B% instead! 

Add updating date and time string

 E2B v1.B5 (grub4dos 0.4.6a 2019-08) supports a constantly updating date+time string to the menu, add to the end of your MyE2B.cfg file: setmenu –string=75=0=0xffffff=”date&time” The date and time string will be printed on all menus and sub-menus in the specified position and colour. See here for more details and different format options. 

Change the Sub-Menu headings

Menu headings for Sub-Menus are set in the STRINGS.txt keyword file in each language folder. If you want to change this text, then create a new language folder and then edit the STRINGS.txt file. See ‘How to make a new Language’ below for details.  

Change the Sub-Menu entries

Menu entries such asUTILITIES Menu         [Ctrl+U]are set in the STRINGS.txt keyword file in each language folder. If you want to change this text, then create a new language folder and then edit the STRINGS.txt file. See ‘How to make a new Language’ below for details. 

Change the E2B text prompts and messages

E2B textual questions, prompts and most text messages are mostly set in the STRINGS.txt keyword file in each language folder. If you want to change this text, then create a new language folder and then edit the STRINGS.txt file. See ‘How to make a new Language’ below for details. Note that most error messages will always be in English and cannot be changed. 

Change the F1 Help menus

The E2B Help menu (F1) is found in the F1.cfg file, one for each language. If you want to change this text, then create a new language folder and then edit the F1.cfg file. See ‘How to make a new Language’ below for details.  

Select a different language

Tip: In the \_ISO\docs\Sample mnu Files\E2B menus folder there is a Change_Language.mnu file. Copy this to the \_ISO\MAINMENU folder – the user can then select a different language from the Main menu (if you set a non-English language in your MyE2B.cfg file, make sure that you follow the special ‘set LANG’ example in the new Sample_MyE2B.cfg file and make sure that there is no \_ISO\STRINGS.txt file present).Each language has a separate folder under the \_ISO\e2b\grub folder, e.g. \_ISO\e2b\grub\SPANISH. All the default sub-menu headings, menu entries and user messages are held in a STRINGS.txt file, and the F1 Help text is in the F1.cfg files. 
If your own language is not available, see here for instructions on how to make you own language files. The variable LANG in the MyE2B.cfg file,sets which language folder will be used.

As time progresses, E2B will support more and more languages (please send me your translations!). 

Do NOT change any of the text in any E2B language folder – if you want to modify the headings or text, then copy it to a new language folder (e.g. \_ISO\e2b\grub\ENG1) and use the ENG1 language (see ‘How to make a new Language’ below). You can use the E2B_Editor.exe GUI to select a different language and keyboard translations file. 

Note: If you are not using a standard American English keyboard, you will also need to set a keyboard type variable (KBD) in the MyE2B.cfg file.

See the \_ISO\Sample_MyE2B.cfg file for examples. Example: Use the Spanish language:

  1. Create a \_ISO\MyE2B.cfg file (e.g. by copying the \_ISO\Sample_MyE2B.cfg file)
     
  2. Add a line into the MyE2B.cfg file to set the new language

    if “%LANG%”==”” set LANG=SPANISH

    Note that by using if “%LANG%”==”” it allows the Change Language.mnu file to work (if you add it into the Main menu)
     
  3. If it exists, delete the \_ISO\STRINGS.txt file because it will always be used instead of any language setting (it will only be present if had you put it there previously for testing purposes!),

For example, \_ISO\MyE2B.cfg could just contain only these two lines which sets the language to Chinese: 

!BATif “%LANG%”==”” set LANG=SIMP_CHINESE 

For Right-to-Left languages such as Arabic, Urdu and Hebrew (if available), you will also need to set the RTL variable in the MyE2B.cfg file. See here for more details.

You may also want to select a Keyboard scan code translation file too, by using the KBD variable in the MyE2B.cfg file, e.g.

set KBD=KBD_AZERTY.g4b 

Other translations: Some users have donated translations of other E2B files such as the Russian Sample_MyE2B.cfg file and a German CSM \menu.lst file for the MPI Tool Pack. If available, these can be found on the Alternate Download Area sites in the LANGUAGES folder. Note that they may be old versions – so use with care!  

Change the E2B Menu headings, menu entries and text

You may want to change the sub-menu entries, headings or text prompts, etc. in E2B. 

  • ISO files and other menu entries that are listed by just their filename, can be changed simply by adding a .txt file
  • The E2B Main Menu heading and the menu Footer help text can be defined in a \_ISO\MyE2B.cfg file.
  • All other E2B sub-menu headings and menu entries can be changed by making a new STRINGS.txt file – see the section below…

e.g. to change ‘DOS Menu’ entry, we need to change a STRINGS.txt language file.

WARNING: Do NOT change any of the E2B standard files. There should be no need to do this because you should have made your own language folder.
If you edit any of the original E2B files, and then if you update to a later version, your changed files will be overwritten by the new version. 

You can cause all menu headings to be centred by adding set CENTREHD=1 into the \_ISO\MyE2B.cfg file (v1.65+). The central position is calculated from the rstart value that can be set in MyE2B.cfg. You can skew the menu headings by using a value other than 1 for CENTREHD – e.g. set CENTREHD=65  will make E2B use 65 instead of the menu width value to calculate the centre of the menu. CENTREHD pads out the heading string with the correct number of spaces (1=auto-adjust), HPAD is used to shift the start of the heading to the right.

How to make a copy of a language file

IMPORTANT: DO NOT EDIT ANY OF THE STANDARD E2B STRINGS.txt FILES – always make a new copy of the file and edit the new copy. 

You can set a language in the \_ISO\MyE2B.cfg file. E2B will then use one of the language folders under \_ISO\e2b\grub. For example, if you wanted to change some of the SPANISH menu text: 

Method 1 (recommended if modifying an existing language):

  1. Copy the whole \_ISO\e2b\grub\SPANISH folder to a new folder in \_ISO\e2b\grub, e.g. \_ISO\e2b\grub\MANUEL
  2. Edit the \_ISO\e2b\grub\MANUEL\STRINGS.txt and F1.cfg help file as you wish (save in UTF-8 format using Windows NotePad)
  3. Create or modify the \_ISO\MyE2B.cfg file (the file must start with a !BAT line) to add the line: 
    if “%LANG%”==”” set LANG=MANUEL

If a particular keyword cannot be found in your STRINGS.txt file, then the keyword from the \_ISO\e2b\grub\ENG\STRINGS.txt file will be used instead.  

Method 2 (DEBUG\TEST ONLY – recommended only when you want to test a new language file):

  1. Copy the \_ISO\e2b\grub\SPANISH\STRINGS.txt file (or whatever STRINGS.txt file you prefer)  to the \_ISO folder
  2. Edit the \_ISO\STRINGS.txt file
  3. (optional) The F1 Help menu F1.cfg can also be copied to the \_ISO folder and edited

Testing a language file

Use Method 2 only for testing a new language STRINGS.txt file – E2B will report any missing strings or keys (ENG will not be used as a backup). Also, this will override any set LANG=xxx setting you have!

You must run through all the E2B boot options (e.g. all WinXP install menus, Vista, Win8, Win10, etc, install menus, each sub-menu: UTILITIES, DOS, etc., .iso and .imgPTN booting, isoboot, etc.) to ensure that all the language strings work. Note: If you have made a mistake in the STRINGS.txt file, it may cause E2B to act strangely (e.g. abort or not display a menu correctly)! To add a completely new language (e.g. Klingon) – please read my blog post here. Always use the ENGlish files from the latest Beta version as a basis for translation.  

Add your own keyword strings

You should only need to do this if you want to support more than one language for your own menus – otherwise just use the text in your .mnu or .txt files. 

Let us suppose you have created a .mnu file for a particular payload file.

Also, you have added a menu option into E2B which allows the user to select either English or German from the Main Menu. 

Then you will need to use a keyword in your .mnu file so that it is translated into English if the user selects English, and German if the user selects the German language.

You can copy the two language folders (e.g. ENGLISH>MYENG and GERMAN>MYGERMAN) and then add your own $$STRxxxx keywords to each STRINGS.txt file.

e.g.

\_ISO\MAINMENU\Steve.mnu

title $$STRxmnu
/%grub%/QRUN.g4b $HOME$/Steve.iso

and add the keyword $$STRxmnu to each STRINGS.txt file in the MYENG and MYGERMAN folders.

\_ISO\e2b\grub\MYENG\STRINGS.txt
$$STRxmnu=Steve’s ISO\nMy special ISO

\_ISO\e2b\grub\MYGERMAN\STRINGS.txt
$$STRxmnu=Diese iso von steve\nMeine spezielle ISO

To avoid conflict with later versions of E2B, I strongly suggest you use your own key names of $$STR followed by exactly four characters  beginning with either X, Y or Z – e.g. $$STRX001 or $$STRYhlp or $$STRZm24. You can then use the new keywords in your own .mnu and .txt files.This may make it easier to edit and change your headings and menu entries because all your strings will be in one place.

Note that keywords are case sensitive.

Fonts

If the standard 16-pixel high unifont font file is loaded (it is normally loaded by default), most UTF-8 characters from U+0 to U+FFFF are supported. If you specify one of the extra 16-pixel high E2B font files, only ASCII characters 20-7E will be displayed in the new font, the others will be displayed using the Unifont fonts (so the extra fonts are only really suitable for English language text). Not all characters (e.g. hindi, Myanmar, etc.) are included in the default unifont font file however.

Note: If you use 24-pixel high fonts (set FONTH=24), then only some of the available user fonts (\_ISO\docs\Fonts\*.f24) contain some foreign language glyphs (0020-00FF). So using large fonts with some non-English languages may not work correctly. E2B is normally in 800×600 Graphics mode. If you use a text mode configuration with no wallpaper (set GFX=none), then you cannot use a different font or a non-English language because non-ASCII (unifont) characters above 007F require a graphics mode. 

— oOo —

Tips:

  • Use redir and redirp to suppress the default English E2B start and enumeration messages by using a MyE2B.cfg file (see Sample_MyE2B.cfg for details). NOT RECOMMENDED because you will not see important diagnostic\error messages.
  • If you want to change the E2B startup messages, don’t change \_ISO\e2b\grub\Menu.lst, just copy it to a new language folder e.g.  \_ISO\e2b\grub\Manuel\Menu.lst and edit that copy.
  • If a \_ISO\Menu.lst file exists, it will be used instead of any other Menu.lst language file.
  • If a \_ISO\STRINGS.txt file exists, it will always be used instead of any other STRINGS.txt version and the LANG= setting will be ignored. Any missing keywords will be reported (the _ISO\e2b\grub\ENG\STRINGS.txt file is NOT searched for missing keywords).
  • For a more ‘professional’ silent boot experience, use the \_ISO\docs\patchme file to patch grub4dos and suppress most of the grub4dos pre-boot messages (see also the Sample_MyE2B.cfg file).

— oOo — 

Make your own Language files

Go to this page to ‘New language page to your own language. 

After you have translated the STRINGS.txt and F1.cfg files, you can use WinMerge as follows:
 1. Install WinMerge onto your Windows system (there are a selection of  languages in the View – Language menu)

2. Copy the Easy2Boot files twice to two identical folders, for example: C:\Temp\_ISO\e2b\grub\ENG and C:\Temp\_ISO\e2b\grub\SPANISH

3. In Windows Explorer, select both folders – right-click and select WinMerge to open them in WinMerge for comparison

4. Change the View options to show all files (tick all view options including identical files) Now you can double-click on any file and WinMerge will open one file in a left pane and the other in a right pane. 

You can now edit the words in the ‘Spanish’ pane whilst keeping the ‘English’ file unchanged. Click the small cross in the top right to save changes and go back to the main file/folder view. Now you can see which files you have already changed.

Multi-buy discount 10%

eBooks (in PDF format)

Easy-to-read eBooks are available in PDF format (each eBook is over 100 pages) – rated 4.5/5 stars.
Learn the secrets of Legacy and UEFI USB booting and then make your perfect multiboot USB drive.
E2B eBook #1 includes instructions on how to remove the E2B 5-second start-up delay blue screen.

E2B is unique in that it uses partition images which allows you to directly boot from Secure Boot images (no need to disable Secure Boot or run MOK manager or modify your UEFI BIOS).

Most eBooks are over 100 pages long, contain original content (not AI generated!) and step-by-step exercises which are suitable for both the beginner or the more experienced user.
Customer reviews are located at bottom of each eBook product page and multi-buy discounts are available when you buy more than one eBook. Please also visit RMPrepUSB.com and the E2B Forum.
Subscribe to my blog for the latest news, tips, USB boot articles and free eBook updates.