Importing Data Sets

Creating data sets in the "Variables" dialog is a simple but not very efficient method. If you need a large number of data sets you'd better compose a list of those with an external text editor and then import the list into Photoshop Elements.

To hold names of the imported sets we may need an extra variable.

1. Create in the document a new text layer (with whatever content) and hide it. Let's name this layer "hidden text".

2. Open the "Variables" dialog, select "hidden text" layer, set variable type to "Text Replacement", and name the new variable "country_language".

This variable will help us to identify the imported combinations of destination and localization.

3. Now open any text editing app, create a new document, and enter a text like this:

country_language, welcome_header, welcome_image

kenya_en, Welcome!, c:\My Project\Welcome Photos\Kenya.jpg
kenya_de, Willkommen!,c:\My Project\Welcome Photos\Kenya.jpg
kenya_ru, Добро пожаловать!,c:\My Project\Welcome Photos\Kenya.jpg
kenya_jp, ようこそ!,c:\My Project\Welcome Photos\Kenya.jpg

thailand_en, Welcome!, c:\My Project\Welcome Photos\Thailand.jpg
thailand_de, Willkommen!,c:\My Project\Welcome Photos\Thailand.jpg
thailand_ru, Добро пожаловать!,c:\My Project\Welcome Photos\Thailand.jpg
thailand_jp, ようこそ!,c:\My Project\Welcome Photos\Thailand.jpg
...

The first line contains comma separated variable names, exactly the same as in the "Variables" dialog.
(A mismatch of variables quantity or any error in a name will result in import failure.)

Each of the below lines contains a set of the variable values:
destination_localization, welcome message, path to the graphic file.

4. Once the list of data sets is ready, save it as a plain text (.txt) document.
In case the document contains non- Latin characters,be sure to choose the proper encoding, e.g., UTF-8.

5. Return to PSE Editor and run "Import Data Sets" script.
In the dialog that opens, browse to the file saved in p. 4.

6. In the next dialog, make sure that:
- The proper encoding is selected (the "Automatic" option may not work).
- "Use First Column For Data Set Names" gadget is checked. (That's what "country_language" variable was created for.)
- "Replace Existing Data Sets" option is selected.

7. Press "OK" and -- if everything has been done correctly -- the imported data sets appear in your document.
Now you can find them in the "Variables" dialog.

Previous Next