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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
(4 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
|NextPage=Documentation/DevGuide/OfficeDev/Custom Path Variables
 
|NextPage=Documentation/DevGuide/OfficeDev/Custom Path Variables
 
}}
 
}}
{{DISPLAYTITLE:Predefined Variables}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/OfficeDev/{{SUBPAGENAME}}}}
The path substitution service supports a number of predefined path variables. They provide information about the paths that {{PRODUCTNAME}} currently uses. They are implemented as read-only values and cannot be modified.
+
{{DISPLAYTITLE:Predefined Variables}}
 +
The path substitution service supports a number of predefined path variables. They provide information about the paths that {{AOo}} 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''.
 
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''.
Line 26: Line 27:
 
<code>$(insturl)</code>  
 
<code>$(insturl)</code>  
 
|Single path  
 
|Single path  
|The absolute installation path of {{PRODUCTNAME}}. Normally the share and ''program'' folders are located inside the installation folder. The <code>$(instpath)</code> and <code>$(insturl)</code> variables are aliases to <code>$(inst)</code> - they are included for downward compatibility and should not be used.  
+
|The absolute installation path of {{AOo}}. Normally the share and ''program'' folders are located inside the installation folder. The <code>$(instpath)</code> and <code>$(insturl)</code> variables are aliases to <code>$(inst)</code> - they are included for downward compatibility and should not be used.  
 
|-
 
|-
 
|<code>$(prog)</code><br>
 
|<code>$(prog)</code><br>
Line 32: Line 33:
 
<code>$(progurl)</code>  
 
<code>$(progurl)</code>  
 
|Single path  
 
|Single path  
|The absolute path of the program folder of {{PRODUCTNAME}}. Normally the executable and the shared libraries are located in this folder. The <code>$(progpath)</code> and <code>$(progurl)</code> variables are aliases to <code>$(prog)</code> - they are supported for downward compatibility and should not be used.  
+
|The absolute path of the program folder of {{AOo}}. Normally the executable and the shared libraries are located in this folder. The <code>$(progpath)</code> and <code>$(progurl)</code> variables are aliases to <code>$(prog)</code> - they are supported for downward compatibility and should not be used.  
 
|-
 
|-
 
|<code>$(temp)</code>  
 
|<code>$(temp)</code>  
 
|Single path  
 
|Single path  
|The absolute path of the current temporary directory used by {{PRODUCTNAME}}.  
+
|The absolute path of the current temporary directory used by {{AOo}}.  
 
|-
 
|-
 
|<code>$(user)</code><br>
 
|<code>$(user)</code><br>
Line 42: Line 43:
 
<code>$(userurl)</code>  
 
<code>$(userurl)</code>  
 
|Single path  
 
|Single path  
|The absolute path to the user installation folder of {{PRODUCTNAME}}. The <code>$(userpath)</code> and <code>$(userurl)</code> variables are aliases to <code>$(user)</code> - they are supported for downward compatibility and should not be used.  
+
|The absolute path to the user installation folder of {{AOo}}. The <code>$(userpath)</code> and <code>$(userurl)</code> variables are aliases to <code>$(user)</code> - they are supported for downward compatibility and should not be used.  
 
|-
 
|-
 
|<code>$(work)</code>  
 
|<code>$(work)</code>  
Line 50: Line 51:
 
|<code>$(path)</code>  
 
|<code>$(path)</code>  
 
|List of paths  
 
|List of paths  
|The value of the PATH environment variable of the {{PRODUCTNAME}} process. The single paths are separated by a ';' character independent of the system.  
+
|The value of the PATH environment variable of the {{AOo}} process. The single paths are separated by a ';' character independent of the system.  
 
|-
 
|-
 
|<code>$(lang)</code>  
 
|<code>$(lang)</code>  
 
|Part of a path  
 
|Part of a path  
|The country code used by {{PRODUCTNAME}}, see the table Mapping ISO 639/3166 to <code>$(lang)</code> below for examples.  
+
|The country code used by {{AOo}}, see the table Mapping ISO 639/3166 to <code>$(lang)</code> below for examples.  
 
|-
 
|-
 
|<code>$(langid)</code>  
 
|<code>$(langid)</code>  
 
|Part of a path  
 
|Part of a path  
|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 {{AOo}}. 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>  
 
|Part of a path  
 
|Part of a path  
|The language used by {{PRODUCTNAME}} as an English string, for example, "german" for a German version of {{PRODUCTNAME}}.   
+
|The language used by {{AOo}} as an English string, for example, "german" for a German version of {{AOo}}.   
 
|}
 
|}
  
Line 248: Line 245:
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Office Development]]
+
 
 +
[[Category:Documentation/Developer's Guide/Office Development]]

Latest revision as of 13:20, 3 January 2021



The path substitution service supports a number of predefined path variables. They provide information about the paths that Apache OpenOffice 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 Apache OpenOffice. 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 Apache OpenOffice. 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 Apache OpenOffice.
$(user)

$(userpath)
$(userurl)

Single path The absolute path to the user installation folder of Apache OpenOffice. 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 Apache OpenOffice process. The single paths are separated by a ';' character independent of the system.
$(lang) Part of a path The country code used by Apache OpenOffice, see the table Mapping ISO 639/3166 to $(lang) below for examples.
$(langid) Part of a path The language identifier used by Apache OpenOffice. 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 Apache OpenOffice as an English string, for example, "german" for a German version of Apache OpenOffice.

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