File Extension(s) | .plist |
i18n type(s) | PLIST |
Apple Information Property List (PLIST) files are used to store serialized objects. They are mostly used in macOS, iOS, NeXTSTEP, and GNUstep programming frameworks.
Sample data
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>user</key> <array> <dict> <key>info</key> <array> <dict> <key>username</key> <string>Please enter your username</string> <key>password</key> <string>Please type your password</string> </dict> </array> <key>additional_info</key> <dict> <key>email_address</key> <string>Email Address: </string> <key>telephone</key> <string>Tel: </string> <key>country</key> <string>Country: </string> </dict> </dict> </array> </dict> </plist>
How data is parsed
Property List files are XML-based files. It defines various tags for related CoreFoundation types and Foundation classes. Out of those tags, only the <string>
tag contains data that should be translated.
So, Transifex first validates the content of the .plist file, then searches for the <string>
tags and imports the strings contained in them for translation.
XML tags not belonging to the .plist format are ignored. On the other hand, comments and valid non <string>
.plist tags are saved as they are.
Transifex expects a property-list object to be a root at the top of the .plist tree. If there are many root elements at the top of the hierarchy, Transifex will produce an error to inform the user about this.
Transifex imports any valid XML comment preceding an element as a comment for the element itself if it is a primitive type like <string>
or applies the comment to all descendants of the element. If a descendant element already has a comment associated with it, it overrides any comment inherited from a parent. Also, note that inside a dictionary <dict> element, the comment must precede the <key> element itself, not the value element.
Download options
When a .plist file is downloaded for use from Transifex, any untranslated string in it is replaced by the source string.
When downloaded for translation, it contains only translated strings. In any case, the elements not parsed and not ignored by Transifex are present in the downloaded files as they were in the source .plist file.
When downloaded for review, the .plist file contains only the reviewed translations.
And here is the table with the expected return results of the various download modes also for CLI and API:
*The results are compatible with parser version 1.
Additional Information
💡Tip
Looking for more help? Get support from our Transifex Community Forum!
Find answers or post to get help from Transifex Support and our Community.