TranslatedStrings.Txt Explained – Customizing the File Structure in Adobe Lightroom
Tuesday night, I came across a question at the Photography Stack Exchange asking how to customize the folder structure of imports in Lightroom. After some research, I figured out that you can do this with a special file called “TranslatedStrings.txt,” and I posted some basic instructions for that last night.
I’ve had a little more time to experiment with the TranslatedStrings.txt file, so here’s a little more information to help you if you want to customize your own directory / folder structure.
What Is TranslatedStrings.txt?
This file includes localization information for Lightroom. If you change the language to Spanish, for example, Lightroom will look for a TranslatedStrings.txt file full of Spanish strings, and it will use those to replace the English strings throughout the software. It can also alter templates for things like the organize “By date” options in the Import dialog.
Within your Adobe Lightroom program directory, there is a folder called “Resources.” Within that, you need to create a folder called “en.” The TranslatedStrings.txt file should be placed in that folder. [Note: If you use a different language, you should instead edit the appropriate language - i.e. the file in the "es" folder for Spanish, the file in the "de" folder for German.]
How Do I Change the Directory Structure?
Here’s an example of what you can customize. To change the options in the dropdown menu for organizing files by date, insert the line (with quotations):
This will change the first option in the dropdown menu to be something like “2011/08/04.” This actually is already one of the standard options, but you can create any format you like by altering the string of characters that comes after the equal sign.
What Values Can I Use in the Date String?
Here’s the tricky part. To customize the date format, you need to customize the string that comes after the equal sign. However, I’m not sure what format Adobe used for this replacement. Through trial and error, though, I have identified the 16 possible variables that you can use in the date. To use the variable, insert a % sign and the letter into the string.
- a – Abbreviated day of the week (“Wed”)
- A – Full day of the week (“Wednesday”)
- b – Abbreviated month (“Aug”)
- B – Full month (“August”)
- d – Date, leading zero (“03″)
- e – Date, no leading zero (“3″)
- H – Hour, 24-hour format (“15″)
- I – Hour, 12-hour format (“07″)
- j – Date, leading zero
- m – Month number, leading zero (“08″)
- M – Minute, leading zero (“06″)
- p – “AM” or “PM”
- P – Also creates “AM” or “PM,” but when I tried this it broke another part of the string; I’d advise against using it
- S – Seconds, leading zero (“05″)
- y – 2 Digit Year (“11″)
- Y – 4 Digit Year (“2011″)
To my knowledge, these are the only variables / values that you can put into the date string. If you try to use another letter or number as a variable, Lightroom will crash on start-up.
You can, however, put in constant characters. Any character that is not immediately preceded by a % will simply appear in the template as it is. For example, maybe you wanted to sort all of your photos first by year, then by personal / business, and then into YYYY-MM-DD folders. You could create two options.
Depending on the type of import you’re doing, select one of these two templates and let Lightroom do the rest automagically.
What Else Can TranslatedStrings.txt Do?
Well, that’s a good question. I would have assumed that it simply performed a localization function, but this functionality to create templates is pretty cool.
I’m sure there are other cool things this file can do, it’ll just take some time to research and experiment. For starters, I want to know what numbers are useable in the “ShootArrangement” value, and how that affects the placement of a template within the dropdown menu.
Tell us what do you think.