The Complete Guide to Adding Context to Strings.
Transifex provides multiple methods of providing context to translators in order to help them translate each string. This guide will introduce the user to all the context tools that Transifex offers.
Developers and Project Maintainers can provide written instructions to translators that can describe the context of each string. The two forms of written context are:
This information appears in the translation editor here:
These types of notes are added to source files by developers. Not all file formats support developer notes though. The file types which support developer notes are the following: Android XML, Apple PLIST, Apple Strings, JSON (Chrome), Structured JSON, PO, Mozilla DTD, Windows Resx, Resw and Resjson, Xliff, xlsx (as context) and YAML.
If your file type does not support developer notes, then written context can be added in the form of a string instruction either manually or via the API as metadata. String Instructions appear in the same location as developer notes.
Sometimes a Translator needs to see where on a screen the string resides in order to get a feel for how a string is translated. For such cases Transifex provides the following options:
Visual Context For Mobile Applications:
When creating Mobile applications, space constraints are at a premium. That is why we recommend our visual context feature which maps strings to screenshots. This will enable translators to physically see where on the tiny screen, the strings reside. Screenshots can be uploaded manually or via the API. Conversely strings can be mapped either manually or via the API as well.
The resulting mapping can be viewed in the translation editor. Source strings that have visual context are displayed with a little screen icon as seen below:
Clicking on the icon will allow you to view the mapping under the context tab in the editor as seen below:
Clicking on the screenshot in the screenshot list will open up the mapping. Note a string can be associated with multiple screenshots. This feature requires the advanced plan and up.
Visual Context For Web Applications (Context For Files):
Context for files works by providing a list of URL’s that are associated with a given string. As an example see the image below:
Clicking on a given URL in the list will open up the web page with the string highlighted as seen below:
If the string was not translated, then the original source text would be highlighted. This feature is a paid premium add-on that can be added to any plan.
Visual Context For Web Applications (Transifex Live):
Within Transifex you have the option to translate directly on your web-site. This is called Transifex Live. Because you are translating directly onto your web-site you can see how all the strings are arranged on your site. This project type is useful if you are translating a web-site that has never been localized before, is not heavily SEO dependant or if you wish to get started quickly without necessarily involving your development team. More information can be found here. Transifex Live is included in any paid plan.
Visual Context For Users of Figma:
If your development team uses Figma as their design tool, then designs from Figma can be imported into Transifex complete with strings mapped to the appropriate graphic. All that is required is to select the strings in your Figma Layout that you wish to translate, click the push to Transifex button in our Figma Transifex Plugin and the strings are sent to Transifex, along with the Figma Layout. The translator then accesses the screenshot in the same manner as indicated in the Visual Context For Mobile Applications section (Item 1 above). More information can be found here. This plugin is a paid add-on available on any plan.
Oftentimes when context is not provided, translators will ask for it via a comment, or an issue. Issues differ from comments in that they need to be resolved. The responses to these issues and comments can be perceived as context and can be filtered in the translation editor. It is preferable though when responding to context related comments and issues to add String Instructions as well, as string instructions are more visible.
For more information on how to use context, please read the blog post here.