Predefined Variables

From Apache OpenOffice Wiki
Jump to: navigation, search

The path substitution service supports a number of predefined path variables. They provide information about the paths that currently uses. They are implemented as read-only values and cannot be modified.

The predefined path variables can be separated into three distinct groups. The first group of variables specifies a single path, the second group specifies a list of paths that are separated by the shell or operating system dependent character, and the third group specifies only a part of a path.

All predefined variable names are case insensitive, as opposed to the user-defined variables that are described below.

Predefined variables supported by service
$(home) Single path The absolute path to the home directory of the current user. Under Windows this depends on the specific versions: usually the <drive>:\Documents and Settings\<username>\Application Data under Windows 2000/XP and <drive>:\Windows\Profiles\<username>\Application Data under Windows NT and Win9x, ME with multi user support. Windows 9x and ME without multi-user support <drive>:\Windows\Application Data.


Single path The absolute installation path of Normally the share and program folders are located inside the installation folder. The $(instpath) and $(insturl) variables are aliases to $(inst) - they are included for downward compatibility and should not be used.


Single path The absolute path of the program folder of Normally the executable and the shared libraries are located in this folder. The $(progpath) and $(progurl) variables are aliases to $(prog) - they are supported for downward compatibility and should not be used.
$(temp) Single path The absolute path of the current temporary directory used by


Single path The absolute path to the user installation folder of The $(userpath) and $(userurl) variables are aliases to $(user) - they are supported for downward compatibility and should not be used.
$(work) Single path The absolute path of the working directory of the user. Under Windows this is the My Documents folder. Under Unix this is the home directory of the user.
$(path) List of paths The value of the PATH environment variable of the process. The single paths are separated by a ';' character independent of the system.
$(lang) Part of a path The country code used by, see the table Mapping ISO 639/3166 to $(lang) below for examples.
$(langid) Part of a path The language identifier used by An identifier is composed of a primary language identifier and a sublanguage identifier such as 0x0009=English (primary language identifier), 0x0409=English US (composed language code). The language identifier is based on the Microsoft language identifiers, for further information please see:

Language Identifier Constants and Strings

The language identifier returned by $(langid) is a string expressed in decimal notation. Example for English US : 1033 whereas Microsoft documentation uses hexadecimal notation : 0x0409

$(vlang) Part of a path The language used by as an English string, for example, "german" for a German version of

The values of $(lang), $(langid) and $(vlang) are based on the property ooLocale in the configuration branch org.openoffice.Setup/L10N, that is normally located in the share directory. This property follows the ISO 639-1/ISO3166 standards that define identification codes for languages and countries. The ooLocale property is written by the setup application during installation time. The following are examples of table Mapping ISO 639/3166 to $(vlang):

Mapping from ISO639-1/ISO3166 to $(lang) and $(vlang)
ISO 639-1 ISO 3166 $(lang) $(vlang)
ar * 96 arabic
ca AD 37 catalan
ca ES 37 catalan
cs * 42 czech
cz * 42 czech
da DK 45 danish
de * 49 german
el * 30 greek
en * 1 english
en GB 1 english_uk
es * 34 spanish
fi FI 35 finnish
fr * 33 french
he * 97 hebrew
hu HU 36 hungarian
it * 39 italian
ja JP 81 japanese
ko * 82 korean
nb NO 47 norwegian
nl * 31 dutch
nn NO 47 norwegian
no NO 47 norwegian
pl PL 48 polish
pt BR 55 portuguese_brazilian
pt PT 3 portuguese
ru RU 7 russian
sk SK 43 slovak
sv * 46 swedish
th TH 66 thai
tr TR 90 turkish
zh CN 86 chinese_simplified
zh TW 88 chinese_traditional

Personal tools
In other languages