Did you ever run into space issues with translations for iPhone or Android apps?
I’m not talking about outer-space, the final frontier, but the space you’ve allocated for strings on the GUI.
In many languages, especially German, French and Spanish, translations are often around 150% the length of originals. Since iPhone apps have to run on a compact display, these texts may overflow and cause display issues.
Unfortunately, it will always happen for the most important texts.
Think about it for a moment. Which text would you carefully style? The most important, short ones or the long explanations?
New in ICanLocalize – limiting translation size
Now, you can avoid running into these problems completely.
Our Software Localization projects support a new feature that allows setting absolute limits for translation lengths.
Once set, translators cannot complete strings with the size over your maximum.
For example, you can’t write “contact us” in French using very short text. Instead, the translator can enter “Contacter”. It’s not the precise translation for “Contact us”, but it’s good enough and fits your space budget.
Now that you’ve set a hard limit on the length, the translator will know that Contactez-nous doesn’t fit and will check with you for alternatives.
Setting limits on string size
There are two ways for you to specify maximum length for strings. You can either enter it into the resource file, as a comment, or manually by editing the strings in our system.
Using comments in the resource file
To set as comment, include icl_max_langth=LENGTH! anywhere in the comment. For instance, this would work:
/* The contact us button icl_max_langth=110! */ "contact" = "Contact us";
Our parser checks the comments for any string. If it finds icl_max_length=LENGTH! (with the exclamation mark, as terminator character), it sets the maximal length for that string.
The maximal length is specified as percentage of the length of the original string.
Through the translation editor
The other option is to use the translation editor.
Go to the project, click on ‘View or edit translations’ and then edit a string.
Click on the button to set the maximum length.
Checking length problems in completed projects
Once you’ve set maximum lengths for strings, translators cannot complete them with texts that don’t fit.
But, what about already-completed projects? Not a problem.
Head over to the Strings lengths report (you can access it from the bottom of the project page).
You’ll see a table with the breakdown of string lengths in your project. There’s a new row there that says “Above user defined maximal length“.
It tells you how many strings overflow the maximum length in each language. Click on the label to see the strings themselves.
Anything else we can help with?
This feature came after several users requested it. To be honest, we also noticed it would be pretty powerful as we’re using our own system too.
Keep these suggestions coming!