Smartling allows you to set a length limit on a string’s translation to help ensure translations are kept to a certain length. This is particularly useful when translated content that will be seen somewhere with limited space, such as app push notifications or email subject lines. Setting a length limit warns translation resources when a translation exceeds your limit. You can configure the severity of this warning in your Quality Checks setting.
String length limits are set on the source string and apply to all target languages.
Spaces are counted as characters. For more information on what is considered a character count, read our documentation on Character Counts Explained.
Configure Translation Limit Unit
Account Owners and Project Managers can set the translation limit unit in the project settings:
- Go to a project in Smartling
- Click Settings
- In the project details, choose a limit unit from the dropdown menu: character or byte
- Changes are saved automatically
Set a Length Limit
- To add length limits to strings, enter the Strings View to find the string
- From a Project, click the Strings tab
- From a Job, click View Strings
- You can use search or filters to locate the string
- Select the string(s) to apply the length limit to
- Click Actions > Add / Remove Length Limits
- Under Add Limit, enter a length limit number
- Click Add
From here, you can choose to remove any existing character limits by click Remove Limit and check "Remove characters limit from the selected strings", and click Remove.
You do not need to remove a length limit before applying another length limit. Adding subsequent length limits to a string will overwrite any existing length limits.
Set a Length Limit in the CAT Tool
Account Owner, Project Manager, and Requester users can set length limits to strings from the CAT Tool.
- In the Additional Details panel, click Set Character Limit
- Insert the character limit number, and click Submit
Viewing Length Limits in the Strings View
Length limits are displayed as part of the string metadata in the default Strings View.
Alternatively, you can view string length limits in the Strings View via the Strings Detail dialog.
- Navigate to the Strings View by doing one of the following:
- From a Project, click the Strings tab
- From a Job, click View Strings
- You can use search or filters to locate the string
- On the string, click the 3 dots under Actions > View String Details
This will open the String Details dialog where you can view all string details, including Issues, Instructions, History. Under Source String Metadata, you'll see the character limit under Max length.
You can also Customize your Strings View by adding a column for the String Length Limit.
Viewing Length Limits in the CAT Tool
Users in the CAT Tool can view length limits set on each string in the target language panel. The number reduces with each character input.
Users in the CAT Tool can also view length limits under the Additional Details panel. This will change depending on which string you are on.
Considerations
Source vs Target
As mentioned above, character limits are set to the source string and apply to all target languages. It is important to consider the typical number of characters used by all target languages in translation. For example, Spanish may typically use fewer characters than Russian. It is also important to consider the character count of the source copy and ensure that the limit applied is greater than the character count of the source string. This will undoubtedly reduce the number of source issues you may have to address.
Characters vs Bytes
The number of bytes a character uses depends on the character itself. A character limit is a character count, not a byte count. The purpose of setting character limits is really just a guide for translators. It’s meant to convey, for example, that this string is used in the application with a very limited and inflexible amount of space - keep the translation character count as short as linguistically possible.
Tip: For more information about byte character counts, read our documentation on how to Calculate Character Byte Counts.
Placeholders & HTML
Any dynamic content that has been secured in a placeholder, will not be counted in the character limit. The same applies to HTML.
Set Character Limits In The Source File
You can set a character limit to a string directly from within the source file by using a character limit directive. For CSV, the character limit is noted in the column before the source string - left to the string it is applied to. For other file types, such as iOS Strings, iOS StringsDict, Android XML, and Custom XML, setting a string translation character limit in the file is supported. The limits apply for the specific string they are configured, not the entire file. If you are using the Strings API, you can set character limits for the translations when creating the string.
Check The Quality Check Configuration
Ensure the Target length limit Quality Check is set to your desired severity level to ensure character limits are adhered to in your translations.