Main menu

What is Asset Context?

The 'context' field is used to disambiguate identical source text

Some platforms (such as Gettext) can make use of context to disambiguate multiple translations with the same source text. Only team members with developer permissions can alter contexts, because they're sensitive like Asset IDs.

Example

The text "Buy now" could be used for both a button and a page header and make perfect sense in both situations. However, other languages may require slightly different translations, which would require two assets with the same source text. By setting the context property to either "button" or "header" you can differentiate between otherwise identical assets and maintain a unique key.

Not all export formats support context, but those that do will include it as part of the unique lookup key.

When to use context

If your platform doesn't observe string context you can safely ignore this field. Generally speaking, it's only required when you're working without unique IDs.

Context values are intended to be short and used only when needed to maintain uniqueness of the source text. If you're using context for categorization or instructional purposes, there are better tools:

  • Context is not a tag.
    Avoid using context for organizing assets into categories. Use tags for that.

  • Context is not a comment
    Avoid using context to give detailed instructions to translators. Use the notes field instead.

See also

Last updated by