| Localization of PE32/PE32+ files |
|
|
|
|
JPAGE_CURRENT_OF_TOTAL PE32/PE32+ filesPE32/PE32+ files are executable files (exe, dll, ocx, cpl, scr, etc.) of Windows OS (Windows 98, NT, 2000, XP, Vista, CE, Mobile, etc.). The PE32 format stands for Portable Executable 32-bit, while PE32+ is Portable Executable 64-bit format. These files are referred to as PE files below. PE files consist of sections, each of which may contain data of different types. Standard types of data are import data, export data, relocation tables, resources, thread data, etc. Usually this data is contained in separate sections but it is also possible to place data of different types in a single section. The application code and data for it can be placed randomly – in one section, in different sections or they can be allocated to several sections. According to PE32/PE32+ specifications, the maximal count of sections is 65535, but usually PE files contain no more than 10. Each section has a name and attributes. The name of a section can be random. Often, the name reflects the type of data in a section: .text, .data, .rsrc, DATA. CODE, idata. Section attributes are important as they characterize data properties, such as executable code, initiated data, etc. The standard method to localize PE32/PE32+ files is to allocate all language-dependable data to application resources and embed into the application the code that will load resources, depending on the current or user selected language. Localized resources can be placed to a localized file itself, or a separate DLL library, which is usually referred to as a resource library. This library, as a rule, does not contain any useful code and used only to store resources. A file may contain resources for several languages. This file is called multilingual. Another frequently used method of localization is to use text files with strings that need to be localized. Usually this file has INI or XML format and contains data of only one language. The localized application contains the code that loads the required language file and gets data from it. Radialix 2 does not support creation of text language files from PE files but supports localization of INI files, which allows creating new language INI files from the existing ones. The localization method for PE files is mainly determined by the author of the application, type of the used libraries and programming environment. The application must contain the code that ensures loading data from resources, or from external files. If this code is not realized, or realized partially, localization is possible only by creating a localized file – a copy of the original file with modified resources and creation of multilingual files is impossible. |