Plurals

In this guide, you will learn how to create plural forms for each copy component in Frontitude and automatically hand them off to the developers.

‍

Plural forms

There is a difference in the way plurals are handled between each language. In some languages, like English, plurals have two forms, whereas in others there are several forms or just one.

‍

Unicode initiated The Common Locale Data Repository Project (CLDR), where they standardized the 6 forms of plurals: Zero, One, Two, Few, Many, and Other. Frontitude supports all 6 forms of plurals.

‍

Add or remove plural forms

You can add or remove plural forms anywhere you edit your copy in Frontitude.

‍

‍

💡 With plurals you can maintain an organized copy library and avoid duplicate text. That’s why you can only add plural forms to your copy components and not to unattached texts.

‍

In Frontitude’s web app

‍

  1. Open your Copy Library or your Projects.
  2. Select a component or component instance.
  3. In the editing panel, click on Add plurals.
  4. Click Set form in the tab bar above the editing panel.
  5. Choose one of the plural forms (to set it as the main one).
  6. Adjust the copy in the editing panel to match the plural form you chose and click Submit change. You can add multiple plural forms by clicking the + button on the tab bar.

‍

đź’ˇMain plural form: The main plural form is the form that will be featured in your design. The first form you set will be automatically defined as the main one. You can switch between the forms to set them as the main by simply clicking on the tab.

‍

💡Once you add a plural form to a component in Frontitude web app, the original string will be duplicated to enable quick edits. For example: “You have 1 item in your cart” in form One will turn to “You have 2 items in your cart” in form Two.

‍

In Figma

‍

  1. Open the Edit tab in Frontitude’s Figma plugin.
  1. Select a text in Figma.
  2. In the text area, click on Add plurals.
  3. Click Set form in the tab bar above the text area.
  4. Choose one of the plural forms to set as the main one.
  5. Adjust the copy in your file to match the plural form you chose and click Submit change.
  6. You can add multiple plural forms by clicking the + button on the tab bar.

‍

Remove plurals

To remove a single plural form, follow these steps:

‍

  1. Click on the tab with the plural form you’d like to remove.
  2. Click Remove. 

‍

đź’ˇAs long as a plural form is set as Main, you can not remove it. Choose another form, set it as the main form, and then click Remove. No worries, if you try to remove a plural that is in use in other components, we will let you know.

‍

Remove all plural forms from a component

You can remove all plural forms for a component anywhere you edit components in Frontitude. To do that, follow these steps:

‍

  1. Click on the main plural form tab above the text edit box.
  2. Click Remove all plurals.

‍

Pluralization for translators

There is a difference in the way plurals are handled between each language. That’s why translators can add independent plural forms to translations in any target language:

‍

  1. Open your Copy Library or your Projects.
  2. Select a component or a component instance.
  3. Choose the target language from the language drop-down menu above.
  4. In the target language editing panel, click on Add plurals in the translation edit box.
  5. Then click Set form in the tab bar above the editing panel.
  6. Choose one of the plural forms to set as the main one.
  7. Adjust the copy in the editing panel to match the plural form you chose and click Submit change. You can add multiple plural forms by clicking the + button on the tab bar.

‍

đź’ˇTo learn more about translation with Frontitude, read the localization help guide.

‍

Plurals with Variables

Plurals can be used hand in hand with Variables in two ways:

  • ‍It is possible to add plural forms to a component that includes a variable and use the same variable or a different one.
  • ‍In the case of a component with plural forms defined, variables can be added to all the plural forms.

‍

Developer handoff

Once created, plurals will be included in all exported copy from Frontitude, using the file export feature or Developer CLI integration.

‍

‍

Using the Developer CLI

‍

  1. Pull the latest copy that includes plurals.
  2. Pass the count parameter on the translation function call to render a pluralized copy. Read the i18next documentation to learn more about pluralization.

‍

Read the Developer CLI help guide to learn more.

‍

Using file export

‍

Plurals are included automatically when you export your data as a file. 

‍

Fully compatible with the i18next framework

‍

Like all Frontitude’s developer features, plurals are fully compatible with the i18n standard. This means developers can use popular i18n libraries to fetch copy from Frontitude straight into their code and consume it in the UI components without further adjustments.

‍

Copied!