Translating Strings in Plurr Format

Plurals is a tricky internationalization problem typical for all software products going global. Whereas in English nouns, adjectives and some other parts of speech have just one singular and one plural form regardless the associated numeral...

ENGLISH

Clip 1 attachment

Clip 2 attachments

Clip 5 attachments

...in other languages nouns, adjectives and some other parts of speech may have one singular and two and more plural forms, depending on the numeral:

RUSSIAN

Сохранить 1 вложение

Сохранить 2 вложения

Сохранить 5 вложений

Previously, we couldn't properly handle strings like "Clip {N} attachments". But now we're starting to use a new plural format called Plurr. It enables us to apply different forms of nouns and adjectives, depending on actual numbers used in the interface.

See it's official page at GitHub for explanation and examples.

Plurr Format

Here's what strings in Plurr format look like: Clip {N_PLURAL:{N} attachment|{N} attachments}. In the user interface, {N} will be replaced with an actual number and word "attachment" will be used in appropriate form.

To translate a Plurr string you create a pipe-(|) separated list of all plural forms your language has when translating a string. These lists always start with {N_PLURAL: and end with the closing curly brace "}", please do not break this structure. {N} is something that will be replaced with an actual number so you can change its position within a string. Let's see an example:

English:

Clip {N_PLURAL:{N} attachment|{N} attachments} — as you see, the singular form comes first followed by the plural one. If you have more than one plural form in your language, add all the variants separating them with (|).

Russian:

Сохранить {N_PLURAL:{N} вложение|{N} вложения|{N} вложений} — here we have one singular form followed by two plural ones.

***

If you don't have plural forms in your language, leave just one variant of the string:

English:

You included {NOTEBOOKS_PLURAL:{NOTEBOOKS} notebook|{NOTEBOOKS} notebooks}

Thai:

คุณได้รวม {NOTEBOOKS} สมุดบันทึก

***

As seen from the previous example, {N} is not the only possible place holder in Plurr structure. While translating Evernote products you may see placeholders like {NOTES}, {NOTEBOOKS}, etc.

Preview

We've added preview function for all strings with Plurr format, it's available right below the translation box:

After inputting a translation, you may play with different numeral values to see what an actual string will look like. Numbers may be input manually or by using numeric updown next to the value field. If a string contains more than one numeral, you'll be able to check how each case works:

Values you input in the preview box do not affect translated strings, it's just for your convenience. However, make sure you don't input negative values, letters or any other characters: in this case the string won't be rendered and you'll see a corresponding notification:

NOTE: Once a placeholder value is input in preview field, it will be automatically displayed in all strings containing the same placeholder.

What's Next

In the next section you'll learn how to customize your translation preferences in the system to get the most of your Evernote translation experience.