Defining Variables

Suppose, while developing an app for tourists we need to create a greeting card for each destination offered. Furthermore, the greeting message should be localized (that is, its text should depend on the user language).

Assuming there are 30 destinations and 20 user languages, we have to prepare 600 similar pictures. Surely, we'd like to somehow automate the workflow .

1. We begin with creating a template document containing all the required elements. In the example on the screenshot, the graphics on the "Photo"* layer depicts one of the offered destinations, while the text of the "Welcome" layer depends on the localization language. Now we have to explain this to PSE.

*Defining a variable for the Background layer isn't possible.

2. Launch the Define Variables script.

3. In "Variables" dialog window, select "Photo" layer.

4. In "Variable Type" area, check "Pixel Replacement" gadget. In "Name" field, enter some meaningful name, for example, "welcome_image".

Now we can change the displayed photo by modifying the "welcome_image" variable.


5. Select the "Welcome" layer and check "Text Replacement" as variable type. Let's name the new variable "welcome_header". From now on, the contents of the text layer depends on this variable's value.

Previous Next