0 Votes

Dictionaries

Last modified by WikiBot on 2025/03/20 14:15

Dictionary

The file language.lsp in the system folder contains built-in text resources for the IDA SE user interface.

It includes translation of dialogs, menu, messages and other topics.

IDA applications may also contain dictionary language.lsp in the application folder.

Additional dictionaries may be defined for extensions of the application (file extname.language.lsp) and for document types supported by the application (file doctype\language.lsp).

Every application dictionary consists of three parts (the first one is optional for additional dictionaries).

The first record is loaded at the beginning of the session, when the application itself is not yet loaded. It contain translation of application name, names of supported document types, tooltips for toolbar buttons and other required topics e.g., translation of messages about checking licenses.

The second record contains translation of different topics – dialogs, menus, messages, etc.

The rest of the file provides translation for data objects defined in the application.

The format of a dictionary is

 (id "translation" ((doc_type . "translation") ...) ((button_name . "tooltip") ...) topics ...)
(
 topic1
 topic2
 ...
)
app_name
app_options
data_type1
data_type2
...

The id in the first record is the symbol that denotes the application, extension, or document type. If id is not a symbol, the record is treated as the second record (the first one is missing).

 

The format of a topic depends on the topic type, as described below.

Dialogs

Dialog resources have the format:

(name
 ([attr "value" ...])
 (item_name "text" "help" [attr "value" ...])
 ...
)

The first record after the name describes global attributes:

 
:title the dialog’s title
:error the default error message in case of wrong user input

There may also be other global attributes.

Most types of dialog items require two compulsory attributes.

The first one is the label (for buttons, check boxes, static text), error text (for editable fields), or range (for lists).

The second string is the help message.

Both attributes may be NIL if the corresponding resource should not be translated or is translated in a different way.

Special formats are used for

Grid-widget: (name columns rows [attr "value" ...])
Tab-control: (name tab1 "label1" [tab2 "label2" ...])

Menu

Every group of menu item is written as:

(group_name
  (item_name "text" "help" [attr "value" ...])
  ...
)

Messages

Pop-up messages: (name title text button1 ...)
Log and status messages: (name . "text")

Other topics

Simple topics: (name . "value")
Compound topics: (name item1 item2 ...), where every item has the same format.

Translation of data types

The format of data type topic is

(type_name
  (key "translation" ...)
 component_topic
 ...
)

The component topics have the same format, only the component name is used instead of the type name.

Combined dictionary

Alternatively IDA applications and extensions may provide file dictionary.lsp containing translation to multiple languages.

It should start with list of supported languages:

;IDA 4.8 Dictionary
#$(* lang1 lang2 ...)

Every string that have different translations to the supported languages should be written as

#$["translation_1" "translation_2" ...].

If some "translation_i" is identical to "translation_1", it may be represented as =.

If some topic has same translations to all supported languages as some other topic, it may be written as

#$(= ref ...),

where ref ... is a reference to another dictionary item, either in the same dictionary or in a more common one. The reference has the same format as references to dictionary in forms.

It is also possible to define a topic as a concatenation of multiple non-translated strings and translated topics:

#$(+ item ...),

where item is either a "string" or a reference (ref ...) to a dictionary topic.

 

If the file language.lsp is also present it has precedence over dictionary.lsp.