SetupDesignGuide.pdf - Firmware Encoding Index
SetupDesignGuide.pdf - Firmware Encoding Index
SetupDesignGuide.pdf - Firmware Encoding Index
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Setup Design Guide<br />
DRAFT<br />
3.1.3 String Definitions<br />
One of the primary aspects of a user interface is the list of strings associated with it. When an EFI<br />
driver which exports setup information is compiled, the strings are located in a Unicode file. This file<br />
uses the #strdef command to signify the beginning of a string definition. On that same line is an<br />
ISO 639-2 language code, a programmatic name of the string, and lastly the string itself.<br />
#strdef ENG STR_TITLE "My English setup engine"<br />
#strdef ENG STR_PAGE1 "My First Setup Page"<br />
#strdef ENG STR_PAGE2 "My Second Setup Page"<br />
#strdef ENG STR_PAGE3 "My Third Setup Page"<br />
3.1.3.1 Multiple Language Support<br />
The EFI Setup Infrastructure supports multiple languages in the string definitions. The #strlang<br />
command defines what string to associate with the ISO 639-2 language code. Each string is treated as a<br />
token, so it can be noticed that the programmatic name for each string has a corresponding string in<br />
each language. For instance, the STR_TITLE shows up in the English, Spanish, and French set of<br />
strings.<br />
When writing VFR, no concern really needs to be given to which language to use or reference since the<br />
EFI Configuration Driver will determine which language’s string token will be used. For more on this<br />
see section 2.3.<br />
#strlang ENG "English"<br />
#strlang FRA "Français"<br />
#strlang GER "Deutsche"<br />
#strdef ENG STR_TITLE "My English setup engine"<br />
#strdef ENG STR_PAGE1 "My First Setup Page"<br />
#strdef ENG STR_PAGE2 "My Second Setup Page"<br />
#strdef ENG STR_PAGE3 "My Third Setup Page"<br />
#strdef FRA STR_TITLE "Mon moteur de setup Français"<br />
#strdef FRA STR_PAGE1 "Ma Première Page D'Installation"<br />
#strdef FRA STR_PAGE2 "Ma Deuxième Page D'Installation"<br />
#strdef FRA STR_PAGE3 "Ma Troisième Page D'Installation"<br />
#strdef GER STR_TITLE "Meine Deutsche aufstellung maschine"<br />
#strdef GER STR_PAGE1 "Meine Erste InstallationsSeite"<br />
#strdef GER STR_PAGE2 "Meine Zweite InstallationsSeite"<br />
#strdef GER STR_PAGE3 "Meine Dritte InstallationsSeite"<br />
3.1.4 IFR Header Files<br />
The VFR compiler takes all the previously mentioned input files and converts them into a form that is<br />
usable by the EFI setup compatible driver. Since it is highly likely this driver will use a ‘C’ compiler to<br />
be built, the form of the VFR output files are in ‘C’ type header files. The header files should not ever<br />
need to be manipulated, but there are often comments associated with the byte encodings in the header<br />
files. The byte encoding of the header file is generally organized in the order of IFR followed by String<br />
Tokens and then Font data. A portion of a header file might look as follows:<br />
25