Character limit

Learn how to restrict the maximum number of characters in the key translation.

Ilya Krukowski avatar
Written by Ilya Krukowski
Updated over a week ago

By default, the length of the translation values is unlimited but you can provide limits on a per-key basis.

Setting character limit for a single key

To limit the maximum character length of your translations for a specific key, open the project editor, find the desired key, and click on its name:

You will be presented with a key editor. Proceed to the Advanced tab and tweak the Character limit setting:

Once you are ready, click Save.

Setting character limit for multiple keys

If you would like to set character limit for multiple keys in one go, select these keys in the editor by ticking checkboxes next to their names. Then choose Character limit: set/unset action from the bulk actions dropdown.

Enter the desired limit in the text input and click Proceed.

Translation editor and character limit

When a character limit is set, it will be displayed in the translation editor:

This counter shows the current translation length and the maximum allowed length.

When the limit is reached the counter will turn to orange:

In this case you won't be able to enter any more characters into the text input.

If you would like to find all translations that violate the character limit, you can take advantage of the "Translation โ€” is longer than allowed by" filter. Simply enter 1 as the value, and you'll be presented with all translations that go over the limit by at least one character.

Special notes

  • Setting a character limit will not affect the existing translations (in other words, if the key already contains a translation, it won't be trimmed to keep it within the limits).

  • If you put a character limit on a key and then update translations for this key via import (by enabling Replace modified values), bulk actions, automations, find and replace, or Update translation API endpoint, the translation will still be updated even if the entry is longer than the character limit.

    • However, if a user clicks on the imported translation longer than the character limit, they won't be able to save the entry until the value is within the limits.

  • Character limit will be ignored if translation is updated as a part of a Gengo order.

Did this answer your question?