Radialix Sofware

  • Decrease font size
  • Default font size
  • Increase font size
Home Overview Localization of Hard-Coded Strings
Localization of Hard-Coded Strings PDF Print E-mail
Article Index
Localization of Hard-Coded Strings
String search settings
Editing of hard-coded strings
RDMAP Plug-in
All Pages

Radialix 2 localizes resources and strings in the application code (hard-coded strings). The program has built-in tools for string search. However the installation package also contains the RDMAP plug-in for IDA (http://www.hex-rays.com/idapro/), which enables the user to search and edit hard-coded strings with considerably better quality and efficiency. If a string becomes longer after translation, Radialix can carry it over to the next section and correct references to this string automatically. Using the RDMAP plugin, the program can also increase the length of a string by using byte-fillers in the end of a string.

Localization of hard-coded strings is possible only when the user creates a localized file. Creation of multilingual files is not supported.

Types of supported strings

Radialix allows you to edit the following types of hard-coded strings:
Pascal -   strings that have the “string” type in Delphi
The data structure of these strings in Delphi 2007 and earlier:

RefCnt    dd 0xFFFFFFFF //Reference counter, equal to -1
Len       dd ?          //Length of string in characters
Text      db 0 dup(?)   //Characters, each character is 1 byte 
terminator db 0         //Null character – terminator

During extraction, these strings are converted to UNICODE according to the codepage of the text language, which is set in the file properties.
In Delphi 2009, these strings have different formats, depending on the count of bytes taken by one character.
ANSI strings:

CodePage   dw ?          //Codepage of string characters
CharSize   dw 1          //Character size in bytes
RefCnt     dd 0xFFFFFFFF //Reference counter, equal to -1
Len        dd ?          //Length of string in characters
Text       db 0 dup(?)   //Characters
terminator db 0          //Null character - terminator

UNICODE strings:

CodePage   dw ?          //Codepage of string characters
CharSize   dw 2          //Character size in bytes
RefCnt     dd 0xFFFFFFFF //Reference counter, equal to -1
Len        dd ?          //Length of string in characters
Text       dw 0 dup(?)   //Characters
terminator dw 0          //Null character – terminator


Pascal Wide - strings that have the “widestring” type in Delphi
String format:

Len        dd ?        //Length of string in bytes
Text       dw 0 dup(?) //Characters, each character is 2 bytes
terminator dw 0        //Null character – terminator


Pascal Short - strings that have the “shortstring” type in Delphi
Формат строки:

Len        dd ?        //Length of string in characters, max 255. 
Text       db 0 dup(?) //Characters, each character is 1 byte

WIDEZ - strings in UNICODE (2 bytes per character) that end with a null character

Text       dw 0 dup(?) //Characters, each character is 2 bytes
terminator dw 0        //Null character - terminator


ASCIIZ - strings in ANSI (1 byte per character) that end with a null character

Text       db 0 dup(?) //Characters, each character is 1 byte 
terminator db 0        //Null character - terminator


Sometimes the translation can be longer than the original text. As a result, the translation will not fit the available data structure in the code of a localized file. <%APP%> allows you to fix this problem in two ways:

  • placement of a string in a new data section. To ensure correct hyphenation, the program searches for all references to a string and fixes them when a localized file is created. Currently, the program supports only one type of references – 32-bit field that contains a virtual address of the Text field in the string data structure (or address of the Len field for Pascal String). To search for references, the program uses the table of relocations, or searches in the entire code when the RDMAP plug-in for IDA is used. The user can manage references (add or delete them) only by using the RDMAP plug-in. Radialix 2 adds a new section and places long strings in it automatically when a localized file is built. A relevant record is added to the list of messages. Although a string is placed into a new section, data in the original place of a string is changed to translation too – a shortened string is kept.
  • increase of the size of string data structure by using byte-fillers in the end of a string. Usually data structures in PE files are aligned on a 4-bytes boundary, the gaps between data are filled with nulls. The size of string data can be increased only in IDA using RDMAP.