Adobe 65007312 Programming Guide - Page 145
Using ZStrings for Localization, ZString format
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 145 highlights
7 Using ZStrings for Localization ZStrings are an Adobe convention for defining localization strings. You identify a string according to its usage in the user interface, and specify it in the ZString format. This enables Lightroom to look up language-specific versions of the string to display to the user. X In Lightroom, you pass ZStrings to the built-in LOC function to allow for localization of your plug-in's displayed text. See "The LOC function" on page 147. X Resolution of ZStrings depends on dictionary files that you supply, which contain the mappings from the ZString path to the localized string. See "Localization dictionary files" on page 148. NOTE: Reloading a plug-in interactively or automatically after export does not reload any localization dictionaries supplied with that plug-in. The translation dictionaries are read only when the plug-in is first loaded or Lightroom is restarted. ZString format The format of a ZString is: $$$/ZString_path/stringKey=defaultValue $$$ The ZString marker is always required to identify a ZString and distinguish it from any other 8-bit ASCII string. /ZString_path/ The path and key uniquely identifies a specific string, and is used to look up the stringKey= translation in a dictionary file that you provide with your plug-in (see "Localization dictionary files" on page 148.) The path is a series of 7-bit ASCII character strings separated by the slash (/) character. You can use any strings you wish, except that no white space is allowed. The last element of the path is a specific key name, which is separated from the default value by an equal sign (=). The path groups a set of properties; for example, you might use a unique path for a particular plug-in, and within that plug-in further group all strings that appear in a particular dialog. Each plug-in has its own mapping of the context paths, so your path names will not conflict with those used by other plug-ins, or by Lightroom itself. defaultValue The string following the separator (=) is the default display string to use for this ZString. If no matching key exists in the active localization dictionary (or if no appropriate dictionary is found) this value is displayed to the user. Strings values used in ZStrings can contain escape sequences to indicate certain characters; see "ZString characters and escape sequences" on page 146. 145