Approving and Managing Content for Translation
After you have created a Live resource, you’re ready to add strings from your website to Transifex for translation. Through this string approval process, you can select precisely which strings to save for translations, and which ones to leave untranslated.
Before we show you how to approve strings, let’s look at how you can navigate through your site in Transifex Live and get to the pages with the content you want to approve.
First, go to Transifex Live. If you have the Live snippet installed, head to your website and type in your website’s URL then add
?transifex to the end. For example, if your website was
<a href="http://www.example.com">www.example.com</a>, type
<a href="http://www.example.com/?transifex">www.example.com/?transifex</a>. If you have parameters in your website URL, e.g.
<a href="http://www.example.com?product=1234">www.example.com?product=1234</a>, then add at the end
You’ll be asked to log in to Transifex if you’re not already logged in. If you’re using the in-app version of Transifex Live, select a project from the Dashboard and click the Live button in the right panel.
If you’re translating content from a staging server, be sure you go to or select the staging domain instead of your production domain.
Once your site is loaded, you’ll see highlighted in blue all the phrases Transifex has detected.
There are a few ways to navigate through your site:
- Double click on a link on your site to go to the linked page.
- Type the URL of the page you want to go to into your browser’s address bar if you’re using the on-site sidebar, or the address bar inside the in-app version of Transifex Live.
- Open the URL panel in the sidebar and click on one of the URL paths in the Pages tab. The list of URLs in the list include pages you’ve navigated to previously. If you’ve installed the Live snippet on your site, pages your visitors have been to will appear in the list as well.
In the sidebar, the URL panel always shows the URL path of the page you're on.
To approve strings and save them to the resource you created earlier:
In the right sidebar of Live, click on Manage strings. A new panel will open up; it’s divided into three tabs: Detected, Approved, and Ignored.
The Detected tab shows you all the strings Transifex has detected on the current page.
You can also apply the On page filter, to see the strings that are currently displayed on your webpage.
You can also check if some strings appear not only on this particular webpage but on other pages as well - by looking at the number of occurrences of a particular string. Click on N occurences and see what other webpages this string appears on.
Use the checkboxes to select the strings you want to save to Transifex. The Select all strings checkbox at the top lets you quickly select all detected strings on the page.
Once you’ve selected the strings you want to save to Transifex, click Approve.
Approved strings turn green and are moved to the Approved tab.
Another way to approve strings is to hover your cursor over a highlighted strings and hitting the checkmark icon. This is slower than batch approving strings but might be useful in situations where you have many detected strings but only want to approve a small selection of them from the page.
Detected strings include both strings that are visible to the users, as well as ones that aren’t, such as title tags, meta descriptions, and alt tags.
Dynamic content such as dates, times, and counters (e.g. # of articles, # of comments, etc.) shouldn’t be translated. When approving phrases, you should ignore these types of nontranslatable dynamic content (see section below on ignoring content). Or if you're able to edit the HTML, you can mark page elements as nontranslatable.
If you have attributes that Transifex Live does not detect by default but you still want them to be localized, then the following steps should be followed:
- Go to the Transifex Live preview
- Open the Live settings
- Add the corresponding attribute name to the Translate tag attributes field:
Please note that in case the text in the form is a placeholder that is not automatically detected by Live, after adding this to the above field, it won't be highlighted in Transifex Live preview. However, such strings can be found under the Detected tab so that they can be approved and translated into the project's target languages.
If you have a lot of content on your site, you’ll also have a lot of strings to manage. Within the Manage strings panel there are a few tools available to help you quickly find a specific string or understand its history:
- A search field for finding a specific word or phrase.
- A filter next to the search field to filter for all strings ever detected on the page, strings which are currently on the page, and strings which were once detected but no longer on the page.
- The initial date Transifex Live detected each phrase on a page. This is helpful for distinguishing phrases from older versions of a page.
- The number of times a string appears on your site.
Not every string on your site needs to be translated; for example, you may not want to translate your company’s name or phrases such as “© 2016.” You can leave these strings out of Transifex by marking them as ignored. Ignored strings don’t count towards your plan’s word count, and visitors will simply see that string in your site’s source (original) language.
Ignoring a string works similarly to approving a string:
From the sidebar, click on Manage strings.
In the Detected tab, select all the strings you want to ignore.
Once you’ve selected the strings you want to ignore, click Ignore.
Ignored strings are moved to the Ignored tab. You can either leave strings there or delete them. Deleting a string completely removes it (and any translations it has) from Transifex. If the string is detected again, it'll appear back in the Detected tab.
And like before, you can hover your cursor over a string to mark it as ignored. Simply click the “x” icon instead of the checkmark to ignore a string.
URL filters allow you to ignore whole URL paths or map one path to another one and keep your list of detected pages and strings cleaner. This is useful if there are sections of your site which you’d like to leave untranslated (e.g. your blog), or if you want to combine multiple pages sharing content and URL pattern.
Each filter is made of:
- A Match method: contains, equals, starts with, ends with, etc.
- A URL path to match.
- A Filter action: ignore or map.
- An Output URL path (optional).
To set up a URL filter:
Head to the URL filters tab in the Manage strings panel.
Click on Add new filter.
Create a rule for the filter.
Click Add to save the URL filter.
Let’s look at two examples:
- To ignore strings from your blog on www.example.com/blog/, choose: starts with, /blog/, ignore.
- To combine all user profile pages that leave in a URL structure like /profile/<username> under a single URL, choose starts with, /profile/, map to, /profile.
In addition to approving and ignoring strings on a page level, you can also do it on a site level.
To do this, simply click on See Overview in the sidebar. This makes all string counters and strings in the Manage strings panel appear on a page level.
When a translatable string is detected by Live, a uniquely defined hash is automatically generated based on the source text. This is considered the identifier of the string that Transifex Live uses so as to map the translations to the corresponding source strings and serve them via our CDN. This hash can be found under the context tab in the editor after approving the string:
When an already approved string is modified in your HTML code, it is marked as "NOT ON PAGE" in Transifex Live since this version of the string is no longer part of your website page.
As far as the newly modified version of the string, it can be found under the DETECTED tab as a completely new entry that needs to be approved for translation. Please note that translations are served by Transifex after the source string is approved, translated and its translation is finally published.
In order to have the translations beforehand and ensure that your visitors will see your website pages fully translated, we would suggest you use a staging site. The goal here is approve and translate the new content before it is live. That way, when the translations are done, you can then apply the changes to your production site along with the already submitted translations. This can easily be done since Transifex Live offers you the option to provide both a production and a staging domain for the same Live resource and also you have the option to decide where the translations should be published first - each domain has its own settings in Transifex Live preview.
So, whenever the content on your website changes, as a localization manager, you will need to:
1. Go through the approving process again: i.e.
Enter Transifex Live > Open the DETECTED tab > Find the newly modified strings> Approve them for translation
2. Remove the old versions of the strings that are no longer needed, i.e.
Visit the Website page where the old versions of the strings were included > Open the approved tab and use the filter “not on page” > Find the strings that are no longer part of this page and remove them.