Transifex

  • Documentation
  • Context
  • Context for files

Context for files

Note

If you are a Transifex user and would like to try Context for Files, be sure to contact our Sales team.

With context for files, users will be able to link their project with one or more web domains. A couple of clicks later, strings will appear highlighted within your web product. Getting visual context has never been easier.

For translators and reviewers to be able to view context for your project’s resource files, first you need to create a .js snippet.

  • Select the project that you need to provide the context for.

  • Go to the Project Settings.

  • Click on Context for files.

  • Click on Add domain to connect one or more domains with the resource files in your project.

    add_domain2.png#asset:6092


  • Enter the number of domains you would like to set the context for. Here you can also connect your staging environment(s).

    add_domain_field.png#asset:6093


    Click on Create snippet.

  • After the snippet is generated, copy it and send to your developer(s) to have it installed on your website.

    copy_snippet.png#asset:6094

Once the snippet is installed, strings will be fetched from your website and mapped against the strings from your file-based project.

Please note that the webpages of your domains must be visited by you or your users at least once.

Installing the snippet

After you have copied the snippet, paste it before the end of the </body> of every page of your website. It can be installed on any domain and any staging environment.

Editing the snippet

After creating the snippet you may wish to edit it and add/remove one or more of the domains associated with your file-based project.

  • Select the project that you need to provide the context for.

  • Go to the Project Settings.

  • Click on Context for files.

  • Click on the pencil icon on the right.

    pencil_icon.png#asset:6095


    Select to remove or add one or more domains.

Deleting the snippet

By deleting the snippet you delete all associations between the domain(s) and your file-based project. So your project will no longer receive strings from your web app.

To delete the snippet:

  • Select the project that you need to provide the context for.

  • Go to the Project Settings.

  • Click on Context for files.

  • Click on the trashcan icon on the right.

    delete_icon.png#asset:6096


  • Click Delete.

    delete_snippet.png#asset:6097

Using in-context

Once the snippet is installed and strings got mapped to your website, your translators and reviewers will be able to see context for the strings that they are working on. The presence of context is indicated by the eye icon displayed above the translation box of a string. Once a translator selects a string to translate they will be able to see the eye icon if context is available for that string.

eye_icon.png#asset:6098

When clicking on the Preview string in website icon, a user will see a list of URLs where this particular string is found.

list_of_URLs.png#asset:6099


Clicking on a URL will open a new tab with the website where the string is highlighted.

website_view.png#asset:6100