You are on page 1of 3

DESCRIPTION

LANGUAGE FILE
ENGLISH VERSION
format version 1.00

Description Language file (format version 1.00).


The language file is an xml-file in UTF-8. The root element of the file has language tag with
the required attributes language version, id, and title.
The id attribute of the form "language-country" or "language", where the language - the twoletter language code according to ISO 639-1 (or three-letter to ISO 639-2, if there is no twoletter), country - two-letter country code according to ISO 3166 -1 (for example "en-gb", "ru").
The title attribute contains the name of the language.
The root tag has two required sections: messages and keyboard.
Messages section contains lines that are used in the program. Each line of the specified tag
msg, which has the required attributes id and text and optional attributes text0, text1, ...,
text9. Id attribute contains the identifier string, which may consist of Latin characters, numbers,
and the underscore character. With the ID program finds the string. Part IDs hard-coded into the
program, and others are used in gui.xml (in the form of "$ id"). The text contains a direct line.
Attributes text0, ..., text9 can set abbreviated writing lines (figure in the attribute name is
not important), then depending on the size of the region, the program will use an appropriate
version . For example: <msg id="Moving" text="Dvizhenie" text1="Dvizh."/>.
Keyboard section contains keymaps. Each layout is specified tag layout. In the layout of
rows of keys are defined using tags row. Keys in each row are given tags btn. The file must be
given at least one layout. The first layout is called national and should contain national
characters. The rest of the layout called special and can contain numbers, and other symbols.
Layout tag has the following attributes: fontSize, horInterval, vertInterval,
vertMargin. FontSize - font size in points (default is 12). HorInterval - horizontal spacing
between the keys. VertInterval - vertical spacing between the rows of keys. VertMargin - the
size of the internal field at the top and bottom of the key. Values horInterval,vertInterval,
vertMargin may contain suffix%, pd, mm, pt. Suffix% means that the value is set as a
percentage of the font size.
1 pd = 1 pixel * dpi / 96.
1 mm = 4 pd 1.0583 mm.
1 pt = 1 pt = 1/72 inch.
If the suffix is not specified, the value is set in pixels.
Btn tag can contain the following attributes: char, action, width. The width attribute
specifies the width of the keys in dimensionless units (default is 1). The actual width of the keys
is determined automatically depending on the width of the keyboard, the number and size of all
the key layout. Char attribute specifies the character that is entered in the input field by pressing
a key. The action attribute specifies the action to take special keys (can not be set
simultaneously with char). It can take the following values:
space - space;
backspace - delete a character;
abcLayout - the transition to a national layout;
specLayout - go to the special layout;
nextABCLayout - Go to the next national layout (long press - to select the layout of the list);
nextSpecLayout - the transition to the next special layout;
hide - hide the keyboard.

You might also like