1. User guide
  2. Advanced Features

Character limits and notes for segments

Set character limits for target segments and add notes about the source text

How to create a project with character limits and notes

When creating a project it may be necessary to set character limits for target segments or add notes for the translator to take into account while translating. Matecat allows you to do so by uploading spreadsheet files formatted in a specific way (.xlsx, .xls and Google Sheets), json files and standard-compliant XLIFF files.

Character limits in spreadsheet files

If you want to set character limits, add a column to the file that has "cell_character_limit" in row 1 and enter the desired character limit (if anything but numbers is entered in the relevant cells, Matecat will show an error). When you do this, the first row of the file will not be imported (the header of any other column becomes irrelevant) and the limit declared will be applied to any cell in the same row. The content in cells with a character limit will not be segmented. Column order is irrelevant: the position of the character limit column will not affect whether charcter limits are applied or not.

Below is an example that illustrates the desired format of the file (keep in mind that the order of the columns does not invalidate the file). Click on the image to download the sample file.

In Matecat's editor, the character limit will be shown in the top right section of the segment, along with a count of the current number of characters in the segment:

Matecat's character counter follows Google Ads' counter by counting everything as single characters except for characters in:

  • Armenian
  • Chinese
  • Georgian
  • Japanese
  • Korean
  • Sinhala
  • Emojis

For these, characters are counted based on their UTF-16 byte size.
Characters in tags are not counted.

If the number of characters in the target text is over the limit set, Matecat will flag it by making the current number of characters red and showing an error below the target segment.

Segment notes in spreadsheet files

If you want to add notes to segments, add a column to the file that has "cell_notes" in row 1, the information in this column will be used as notes for the translator. When you do this, the first row of the file will not be imported (the header of any other column becomes irrelevant) and the notes will be applied to any cell in the same row. The content in cells with notes will be segmented unless they also have a character limit associated. Column order is irrelevant: the position of the notes column will not affect whether notes are applied or not.

Below is an example that illustrates the desired format of the file (keep in mind that the order of the columns does not invalidate the file). Click on the image to download the sample file.

The notes will appear in the "Messages" tab in Matecat's editor:

Can a spreadsheet file have both character limits and notes?

A file can have both character limits and notes: just include both the character limit column and the notes column to have both applied to the cells in the same row. Column order is irrelevant and any cell with a character limit will not be segmented.

Below is an example that illustrates the desired format of the file (keep in mind that the order of the columns does not invalidate the file). Click on the image to download the sample file.

What if my spreadsheet file has multiple sheets?

If your file has multiple sheets, the filter will only apply to the sheet where the "cell_character_limit"  or "cell_notes" columns are found. For example, if you have a file with two sheets and only the first sheet has one of the columns, the character limits and /or notes will only be applied to cells in that sheet.

Json files

You can indicate the keys whose content should be extracted as character limits or notes for the translatable keys inside the same object. You can find further details in the dedicated article.

XLIFF files

Both the XLIFF 1.2 standard and XLIFF 2.0 standard support notes and character limits for segments. If the tool you have exported the XLIFF file from is standard-compliant, it will be fully compatible with Matecat's features.