Adobe 27510753 Scripting Guide - Page 68

Localizing ExtendScript Strings

Page 68 highlights

60 Using ExtendScript Tools and Features dataType String defaultValue any description String help String isCollection Boolean max Number min Number name type String Number String Adobe InDesign CS2 Scripting Guide The data type of the reflected element. One of: l boolean l number l string l Classname: The class name of an object. Note: Class names start with a capital letter. Thus, the value string stands for a JavaScript string, while String is a JavaScript String wrapper object. l *: Any type. This is the default. l null l undefined: Return data type for a function that does not return any value. l unknown The default value for a reflected property or method argument, or undefined if there is no default value, if the property is undefined, or if the element is a method. Short text describing the reflected object, or undefined if no description is available. Longer text describing the reflected object more completely, or undefined if no description is available. When true, the reflected property or method returns a collection; otherwise, false. The maximum numeric value for the reflected element, or undefined if there is no maximum or if the element is a method. The minimum numeric value for the reflected element, or undefined if there is no minimum or if the element is a method. The name of the reflected element. A string, or a number for an array index. The type of the reflected element. One of: l readonly: A read-only property. l readwrite: A read-write property. l createonly: A property that is valid only during creation of an object. l method: A method. Localizing ExtendScript Strings Localization is the process of translating and otherwise manipulating an interface so that it looks as if it had been originally designed for a particular language. ExtendScript gives you the ability to localize the strings in your script's user interface. The language is chosen by the application at startup, according to the current locale provided by the operating system.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184

60
Using ExtendScript Tools and Features
Adobe InDesign CS2 Scripting Guide
dataType
String
The data type of the reflected element. One of:
boolean
number
string
Classname
: The class name of an object.
Note:
Class names start with a capital letter. Thus, the value
string
stands for a JavaScript string, while
String
is a JavaScript
String
wrapper object.
*
: Any type. This is the default.
null
undefined
: Return data type for a function that does not return any
value.
unknown
l
l
l
l
l
l
l
l
defaultValue
any
The default value for a reflected property or method argument, or
un-
defined
if there is no default value, if the property is undefined, or if
the element is a method.
description
String
Short text describing the reflected object, or
undefined
if no descrip-
tion is available.
help
String
Longer text describing the reflected object more completely, or
unde-
fined
if no description is available.
isCollection
Boolean
When
true
, the reflected property or method returns a collection;
otherwise,
false
.
max
Number
The maximum numeric value for the reflected element, or
undefined
if there is no maximum or if the element is a method.
min
Number
The minimum numeric value for the reflected element, or
undefined
if
there is no minimum or if the element is a method.
name
String
Number
The name of the reflected element. A string, or a number for an array
index.
type
String
The type of the reflected element. One of:
readonly
: A read-only property.
readwrite
: A read-write property.
createonly
: A property that is valid only during creation of an
object.
method
: A method.
l
l
l
l
Localizing ExtendScript Strings
Localization is the process of translating and otherwise manipulating an interface so that it looks as if it had
been originally designed for a particular language. ExtendScript gives you the ability to localize the strings
in your script’s user interface. The language is chosen by the application at startup, according to the current
locale provided by the operating system.