Friday 25 March 2016

Changing language strings in E2B

E2B uses the STRINGS.txt file as a lookup file.
Menu headings, menu entries and many of the batch files in E2B use keywords, e.g.

iftitle [if exist STALE && cat --locate=YES ()/FASTLOAD.YES > nul] $$STRmFS1
if not "%GFX%"=="" configfile (md)0xa000+0x50
root ()

where $$STRmFS1 is a keyword (always $$STR followed by exactly four characters) that is substituted by E2B for a line of text taken from a language file.

The user can define a language folder (e.g. 'set LANG=GERMAN') and E2B will look up the $$STRmFS1 key in the \_ISO\e2b\grub\GERMAN\STRINGS.txt file...

Example of a keyword from the German STRINGS.txt file:
$$STRmFS1=\x05 CACHED MENU (FASTLOAD) \x05\n Hauptmenü zum Aktualisieren bitte neu laden\n damit die letzten Änderungen übernommen werden.

Each keyword entry must use only one line in the STRINGS.txt file.

By default, E2B will use the \_ISO\e2b\grub\ENG folder (LANG=ENG).

How to modify and test a STRINGS.txt file

If you want to modify any of the STRINGS.txt files, do NOT edit them directly!
This is because, when you update E2B with the next version, your files will be updated too and you will lose all your edits!

This is the right way to do it:

1. Copy the STRINGS.txt file to the \_ISO folder (also the F1.cfg file if you are modifying that too).

Note: If you define a LANG=GERMAN variable and do not have a \_ISO\STRINGS.txt file present, E2B will load the GERMAN STRINGS.txt and then the ENGlish STRINGS.txt into memory. E2B will search memory for each keyword it finds, so if a keyword is not present in the GERMAN strings, then E2B should find it in the ENGlish strings.

However, when a \_ISO\STRINGS.txt file is present, E2B will use that file and ONLY that file for keyword lookups. If any keywords are missing, E2B will warn you.

This is why, for testing, we put the STRINGS.txt file in the \_ISO folder. You will need to run through every menu and every option (e.g. Win XP Step 1, Win XP Step 2, Win7, Win10, iso file, etc. etc.) to check you get no error messages from any menu or operation.

Note: if you are creating a new language, use the ENG files as the 'template' because these will be the most up-to-date and accurate. Some of the other languages may be for older E2B versions and not accurate.

2. Once you have everything working correctly, make a new language folder, e.g. \_ISO\e2b\grub\DAVE and move the STRINGS.txt file (and F1.cfg file) into the new folder.

Now you can now define a new 'language' setting to use that folder:

if not exist LANG set LANG=DAVE

Make sure that you remove the \_ISO\STRINGS.txt file.

You can add the Change_Language.mnu menu file to the \_ISO\MAINMENU folder and test different languages if you wish (find it in the \_ISO\docs\Sample mnu Files\E2B menus folder).

If you have made a new language STRINGS.txt file or improved an existing one, please send it to me. There is a previous blog post on how to make a new language file here.

No comments:

Post a Comment