The Qalculate! developer(s) are thankful for every possible translation and willing to answer any questions or help with any problems you may have as a translator. Please read through this document before starting the translation.

Qalculate! is split up into a library package (libqalculate, which also includes the text interface) and GUI packages (qalculate-qt and qalculate-gtk).

The GUI packages contain translations for the GUI text in the po directory for Gtk version (traditional Gettext files) and in the translations directory the Qt version (translated using Qt Linguist). The libqalculate translations are split up into two -- translation of error messages, type information and the text interface in po, and translation of definitions of functions, variables, units, etc. in po-defs (merged with the data files in data).

The translation of the libqalculate message strings in po-defs requires some further knowledge. These are merged with the xml data files in libqalculate/data. The different types of message strings in these files are:

Data objects: Values of text properties
Data sets: Categories, titles, names, descriptions, property titles, property names and property descriptions
Functions: Categories, titles, names, descriptions and argument titles
Variables/constants: Categories, titles and names
Units: Categories, titles and names
Currencies: Categories, titles, countries, and names
Prefixes: Names

To distinguish equal text strings with different meanings (for example "Mercury" as a planet and as a chemical element), some text strings are preceded by "!type!" (for example "!units!" for units). Everything between and including a exclamation mark in the beginning and the second exclamation mark is not displayed in the application. Translators do not need to include "!type!" in the translation.

Names require some special considerations from the translator. The names are used to reference an object in a mathematical expression and to display them in a result. An object can have any number of names but each must be fully unique, with the exception that functions can have names used by other types of objects (for example "min" is used as a name for the minute unit but also for a function returning smallest value in a vector). The translation does not need to have the same number of names as the untranslated object.

There are some characters which are reserved for other purposes (mainly mathematical operators) and may not be included in names. These are
- ~ + - * / ^ & | ! <> = ' @ ? \ { } " . , ; : ( ) [ ],
- spaces, tabs and newline characters, and
- unicode signs for operators.

No name may begin with a digit and units are not allowed to contain a digit anywhere.

All names of a object are contained in one text string. The names are separated by commas (','). The order of names decides their priority, which name is by default used for display and input. Each name may be preceded by a number of properties before a colon (':'). The format of the names strings is thus [properties1:]name1,[properties2:]name2,... The possible properties are
- 'a': the name is an abbreviation,
- 'c': the name is case-sensitive,
- 'i': the name should not be presented to the user for input (but looks good for display),
- 'o': the name is appropriate for completion, but should never be presented to the user,
- 'p': the name is in plural form,
- 'r': the name is used as reference,
- 's': the name ends with a suffix (the text after the last '_' will displayed as subscript with the '_' removed, often used in combination with 'i'), and
- 'u': the name contains a unicode sign.

All properties are off by default, except for names with only one sign which are interpreted as abbreviations by default, and for abbreviations which by default are case-sensitive. A property can be turned off by preceding it with a minus '-'.

The reference property tells that the name will be available to all users regardless of the language used. If a reference name is not included in the translated list of names, it is appended at the end (lowest priority) by the program. The translator can include the reference names to select the position of the name and change all properties except 'r', 'c' and 'u'. The reference property is explicitly specified (with or without '-') at least once for untranslated text strings. Names can easily be distinguished from other text strings by the preceding properties and colon.

Most functions and variables have only one name. Units usually have an abbreviated name, a normal name and a name in plural form. Units should always have a name in plural form if it differs from the singular form.

Note that constants (large and traditional numbers) without any reference name are not available to users if not included in the translation.

Property names work like the names described above except that 'r' for reference is the only possible property.

Below follow some examples from the Swedish translation.

msgid "ar:m,meter,p:meters,metre,p:metres"
msgstr "a:m,meter"
The meter unit has the abbreviated reference name "m" (case-sensitive), a normal name "meter" and a plural form "meters". Meter does also in addition have a different spelling in English. The Swedish name for meter is the same as in English but the plural form is the same as the singular, and no alternative spelling exist.

msgid "r:mean"
msgstr "medel"
The name of the mean function is translated to "medel", but since "mean" is specified as a reference name it is appended by the program as the second name (results in "medel,r:mean").

msgid "ar:SEK"
msgstr "a-c:kr,a:SEK,krona,p:kronor"
The English version can only use the three character code for the Swedish currency since the other names can be used for other currencies, but the translation can assume that the user refers to the local currency.

msgid "-r:billion"
msgstr "miljard,p:miljarder"
The constants for large numbers follows two different systems in different countries. With the "short scale" billion means 1e9, while it with the "long scale" means 1e12. Therefore, these constants do not have any reference name. The short scale is used in most English-speaking countries, while in Sweden the long scale is used.

qalc commands and options to commands in libqalculate/po/ follows the same principles as reference names, meaning that the untranslated message string is kept in addition to the translated.
