Difference between revisions of "Documentation/DevGuide/OfficeDev/Predefined Variables"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (FINAL VERSION FOR L10N)
(Replaced obsolete links to Microsoft doc. Added remark on decimal notation.)
 
Line 61: Line 61:
 
|The language identifier used by {{PRODUCTNAME}}. 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:
 
|The language identifier used by {{PRODUCTNAME}}. 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:
  
Table of Language Identifiers<br>
+
Language Identifier Constants and Strings<br>
http://msdn.microsoft.com/library/en-us/intl/nls_238z.asp
+
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693%28v=vs.85%29.aspx
  
Primary Language Identifiers<br>
+
The language identifier returned by <code>$(langid)</code> is a string expressed in decimal notation. Example for English US : 1033 whereas Microsoft documentation uses hexadecimal notation : 0x0409
http://msdn.microsoft.com/library/en-us/intl/nls_61df.aspSubLanguage
+
 
+
Identifiers<br>
+
http://msdn.microsoft.com/library/en-us/intl/nls_19ir.asp
+
 
|-
 
|-
 
|<code>$(vlang)</code>  
 
|<code>$(vlang)</code>  

Latest revision as of 08:32, 8 July 2015



The path substitution service supports a number of predefined path variables. They provide information about the paths that OpenOffice.org 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 com.sun.star.util.PathSubstitution
$(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.
$(inst)

$(instpath)
$(insturl)

Single path The absolute installation path of OpenOffice.org. 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.
$(prog)

$(progpath)
$(progurl)

Single path The absolute path of the program folder of OpenOffice.org. 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 OpenOffice.org.
$(user)

$(userpath)
$(userurl)

Single path The absolute path to the user installation folder of OpenOffice.org. 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 OpenOffice.org process. The single paths are separated by a ';' character independent of the system.
$(lang) Part of a path The country code used by OpenOffice.org, see the table Mapping ISO 639/3166 to $(lang) below for examples.
$(langid) Part of a path The language identifier used by OpenOffice.org. 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
https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693%28v=vs.85%29.aspx

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 OpenOffice.org as an English string, for example, "german" for a German version of OpenOffice.org.

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


Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages