Product
Services
Solutions
BlogDocs
Back

Plurals and Arrays in Translation Editor

In the Localit.io translation editor, you can work with three types of keys: regular text, plural (multiple forms), and arrays. Each type has its own specifics for creation and translation.

Key types in the editor

When creating a new key in the translation editor, you can choose one of three types:

  • Text — regular key with one value

  • Plural — key with multiple forms

  • Array — key with multiple indexed elements

112

Working with arrays

Creating arrays

When selecting the "Array" type, the system will prompt you to specify the element index for creating the first array element.

Example of creating an array:

  1. Select "Array" type

  2. Enter key name: menu_items

  3. Enter the first element index: 0

  4. Add value: "Home"

145

Translating arrays

Translation of array elements is performed exactly like translating regular text. The only difference is that the key name displays the element number in square brackets.

In the key list:

[array] menu_items[0]     "Home"         →  "Inicio"
[array] menu_items[1]     "About Us"     →  "Acerca de"  
[array] menu_items[2]     "Contacts"     →  "Contactos"
[array] menu_items[3]     "Services"     →  "Servicios"

In translation mode:

148

Working with plural forms

Creating plural keys

When selecting the "Plural" type, the system automatically opens a form for filling in multiple forms, taking into account the plural settings for the selected language.

Creation steps:

  1. Select "Plural" type

  2. Enter key name: files_count

  3. System shows all necessary forms for the source language

  4. Fill in each form

146

Configuring plural rules

Plural form settings can be changed in project settings:

Path to settings:

  1. Go to Project Settings

  2. Select "Languages" section

  3. Click on the desired language settings

  4. Configure plural rules

119

Available plural forms:

  • Zero — for zero (in some languages)

  • One — singular

  • Two — dual number

  • Few — small quantity

  • Many — large quantity

  • Other — other cases

Translating plural forms

When translating plural keys, the system automatically shows which forms need to be filled for the target language, helping to avoid errors.

Translation example from English to Russian:

English (2 forms):

files_count:
├── one: "{{count}} file"
└── other: "{{count}} files"

Russian (4 forms):

files_count:
├── one: "{{count}} файл"     
├── few: "{{count}} файла"    
├── many: "{{count}} файлов"   
└── other: "{{count}} файла"  
151

Automatic plural translations

When ordering automatic translation through Google Translate, DeepL, or ChatGPT, some specifics may arise:

Incomplete forms problem: If the source language doesn't have all plural forms that exist in the target language, the missing forms are translated as "Many".

Example:

Source (English): 
├── one: "1 item"
└── other: "%d items"

Translation result (Russian):
├── one: "1 элемент"          ✅ Translated correctly
├── few: "%d элементов"       ⚠️  Translated as "Many"
├── many: "%d элементов"      ✅ Translated correctly  
└── other: "%d элементов"     ⚠️  Translated as "Many"

"Needs Attention" status: Such translations are automatically marked with "Needs Attention" status so translators can review and correct them.

150

Additional information

For more detailed study of working with plural forms, including technical aspects of file upload and export, we recommend reading our Plural Forms Guide.

Editor interface

Visual indicators

The translation editor uses text markers for different key types:

regular_key              — Regular text (no marker)
[plural] plural_key      — Plural forms  
[array] array_key[0]     — Array element
[array] array_key[1]     — Array element

Type markers:

  • [plural] — before the name of keys with multiple forms

  • [array] — before the name of array keys with element index

  • No marker — regular text keys

View modes

List mode:

  • Displays all keys in table format

  • Shows key type, source and translated text

  • Allows quick switching between keys

141

Card mode:

  • Shows detailed information for each key

  • Convenient for working with long texts

  • Displays additional information (comments, status)

140

Practical tips

Working with arrays

Structure planning:

  • Define all array elements in advance

  • Use logical numbering (0, 1, 2... or 1, 2, 3...)

  • Maintain consistency in naming

Example of good structure:

navigation[0] = "Home"
navigation[1] = "Catalog"  
navigation[2] = "About Us"
navigation[3] = "Contacts"

buttons[0] = "Save"
buttons[1] = "Cancel"
buttons[2] = "Delete"

Working with plural forms

Translation verification:

  • Always check automatic plural translations

  • Pay attention to "Needs Attention" status

  • Test with different numbers (0, 1, 2, 5, 11, 21)

Testing examples:

For Russian language:
├── 1 файл     (one)
├── 2 файла    (few)  
├── 5 файлов   (many)
└── 1.5 файла  (other)