UI Text Space Calculator
Formerly: UI Text Space Matrix
Intro
The UI text space calculator is a small app that tells you how much extra space you need to allow for translation, based on the length of your original source text (English or German).
The calculator can help you identify potential truncation issues in other SAP Fiori languages at design time. The space requirements proposed by the calculator are based on over a million translated SAP UI texts, and cover 95% of use cases across all SAP Fiori logon languages.
Responsiveness
In SAP Fiori UIs, texts that exceed the available space are either truncated or wrapped, depending on the UI control used.
Usability issues can occur when texts are severely truncated and the user has no way to access the full texts. This can be critical in other languages that require more space than English.
Where to Find the Calculator
To access the calculator, you can:
- Use the UI Text Space Calculator Fiori app
- Call up the UI Text Space Calculator app on Bridge
- Download the app from GitHub
To look up the space requirements manually, see the tables below for the source languages English and German.
Source Language: English
Source Language: German
Other Measures
pseudo Translation
Once the UI has been implemented, you can test for truncated texts using an artificial logon language called 2Q. This quality step is known internally as pseudo translation.
2Q uses placeholders to simulate the space that will be required by other logon languages before the texts are actually translated. Texts that are likely to be truncated in one or more logon languages are visualized differently on the test UI.
Guidelines
How to Apply the Calculator
When designing the UI, always aim to provide enough space for readable, non-abbreviated texts in all languages, on all devices.
Do Use the calculator to see how much additional space will be needed for all languages. This can help you make informed decisions about the layout, choice of control, text properties, and so on.
Do not Do not limit the technical string length of all UI texts by default.
Handling Technical Length Restrictions
SAP Fiori does not foresee setting technical field length restrictions at source. Instead, the controls have built-in mechanisms for handling longer texts, such as wrapping and controlled truncation.
However, many UI texts from the ABAP back end work with fixed string lengths, In exceptional cases, you may also need to restrict the text length for front-end UI texts.
See the use cases below for guidance on how to handle UI texts with fixed and undefined string lengths.
Use Case 1: String Length is Undefined
Apply the guidelines below if defining a string length is optional (for example, Java, most strings in SAPUI5).
- As a rule, do not restrict the technical string length manually.
- Only consider making an exception if the following apply:
- Space on the screen is absolutely critical.
- There is no automatic mechanism for handling a longer text.
- Screen redesign is no longer possible for the current implementation.
- You expect the truncated text to severely impede users.
- You do not expect the text to be reused in a UI that offers more space.
In this case, use the calculator to determine the target string length.
But: Remember that any length limits you set will stay in place – even if the screen layout and UI rendering are improved later on!
Use Case 2: String Length is Fixed
Apply the guidelines below if a developer has to set the string length, or the length is predefined in the system (for example, ABAP).
- Where possible, allow the maximum number of characters available for the text type.
- Only consider defining a shorter field length if:
- Space on the screen that uses this string is critical
- The EN source text is stable
In this case, extend the value to the target field length specified by the calculator (for example, if the EN text is 4 characters long, set the target length to 10).
Resources
Want to dive deeper? Follow the links below to download the calculator and find out more about using the calculator and pseudo translation.
Elements and Controls
No links.
Implementation
- UI Text Space Calculator – Download (Git)
- UI Text Space Calculator (SAP Work Zone)
- Pseudo Translation – 2Q Starter Kit (SAP Work Zone)
Visual Design
No links.