Some of the strings in your Smartling account might contain some greyed-out text elements.
These elements are blocked from translation and cannot be altered by the translators, as they are used to indicate placeholders for variable text elements.
What are placeholders?
Whenever a website, an application or an email template needs to display some variable content (such as client names, shipping dates or variable pricing information), this is typically achieved by using placeholders.
For example, to greet a customer in an application, the source text might look like this behind the scenes: Hello {FirstName}!
In this example, the placeholder for {FirstName} will be replaced with the customer’s name once they visit the application: "Hello John!", "Hello Jane!", etc.
The actual values - in this example the customer names - are stored in a separate database or file. Once the greeting needs to be displayed, the application runs a query to retrieve the correct value from this database and replaces the placeholder with the actual customer name.
Translating with placeholders
Smartling allows you to use placeholders, in order to ensure that your translated applications and websites offer the same customized user experience for all local markets.
1. In a first step, the source text gets translated in Smartling.
During the translation process, it is important to correctly identify any variable elements as placeholders, so the translators can treat them correctly and insert them in the correct spot.
In Smartling, the placeholder text itself cannot be translated. It is displayed as a greyed-out element which cannot be edited by translators.
Since they are clearly identified, placeholders can easily be positioned in the correct spot within the translated text.
The entire translation should read like a natural sentence once the placeholder gets switched out for an actual value. Therefore, our built-in quality checks ensure that placeholders are preserved in the translation, using the correct format, as well as the correct spacing around the placeholder.
2. Once the translation is completed, the process of switching out the placeholder with an actual value takes place directly within your application (and outside of the Smartling platform).
How to set up placeholders
In most cases, placeholders are set up by your internal team of developers. When the content to translate is sent to Smartling, any placeholders are usually already established and working automatically.
Typically, placeholders are wrapped in special characters to distinguish them from regular text. For example: {x}, {{x}}, %x%, ${x}, etc.
For most file types, all common placeholder formats are recognized automatically by Smartling.
For example, if an element like {FirstName} is included as part of a JSON file, it automatically gets converted to a non-translatable placeholder in Smartling.
Even without adding any specific instructions, this placeholder is automatically detected by Smartling. You can see it appear as a greyed-out element in the Strings View:
For more information on all placeholder formats which can be recognized out-of-the-box, please refer to our documentation for each supported file type.
What to do if placeholders are not identified correctly in Smartling
If placeholders are not identified correctly, they show up as regular, translatable text in Smartling.
This could lead to the placeholder being translated as regular text, preventing your application from working correctly.
There are two scenarios in which placeholders are not automatically blocked from translation. Both of them need to be addressed and resolved, to avoid running the risk of breaking your application.
1. You are using a non-standard placeholder format which is not recognized automatically.
Solution: If you would like to use a customized placeholder format, a "file directive" can be added to the source file to tell Smartling exactly which part of the text should be treated as a placeholder.
The correct directives for each file type can be found in our Help Center.
2. You are using business files (Microsoft Word, PowerPoint or Excel files).
Please note that business files do not support placeholders.
Solution: If business files contain placeholders, this is often due to the fact that some content was copied and pasted from a different platform or application. To properly identify any placeholders, we would recommend opting for a different file format which supports placeholders. Typically, using the "native" file format (i.e. the original format which the content originated in) is your best option.
Considerations for producing content with placeholders
If placeholders stand for values that don't hold any semantic meaning (such as usernames or phone numbers), the translation of the surrounding sentence structure typically doesn't present any particular challenges.
Gender and case
On the other hand, if placeholders will be replaced with words that are embedded in a sentence structure and may have different grammatical genders and cases, this can present some linguistic challenges.
Example:
In English, the following placeholder can easily be replaced with any noun:
Order delicious {mealtypes} now!
Order delicious pizzas now! Order delicious sandwiches now!
In other languages, the various meal types may have different grammatical genders.
This means that - depending on the exact meal type that is being displayed - some further changes to the surrounding sentence structure may be required to avoid any grammar mistakes.
For example, the Italian word for "pizza" is feminine, whereas "sandwich" is masculine.
To provide a correct translation of the entire sentence, the article and the adjective also need to be adjusted to the masculine or feminine form:
Feminine noun: Order delicious pizzas now! - Ordina adesso delle pizze deliziose!
Masculine noun: Order delicious sandwiches now! - Ordina adesso dei panini deliziosi!
Solution:
The easiest workaround to avoid such linguistic challenges is to isolate the placeholder, so it isn't impacted by the sentence structure:
Order a delicious meal now: {mealtype} and more!
Order a delicious meal now: pizzas and more! Order a delicious meal now: sandwiches and more!
Isolating the placeholder - usually by using a colon at the beginning or at the end of a sentence - helps avoid linguistic challenges regarding the proper translation of any articles, pronouns, adjectives or participles.
Plurals
Similarly, if you would like to use placeholders to indicate quantities, it is important to consider that not all languages handle pluralization in the same way.
In English, nouns typically only have one singular form and one plural form.
Example:
Singular: {1} apple
Plural: {0} apples / {2} apples / {few} apples / {many} apples / {any other number} apples
In other languages, the noun for "apples" may use varying forms for each of these plural categories.
Solution:
To properly support all different plural forms, you may want to consider using plural strings. This means that all different plural categories are displayed to the translator, who can provide the correct translation for each of them.