Excel XLSX

Excel spreadsheet file format. You have to provide at least the key name column and one translation column. By default the content is assumed to start in the first row.

File Extensions.xlsx
API Extensionxlsx
Format Optionskey_name_column, comment_column, first_content_row, enable_pluralization
ImportYes
ExportYes
Pluralization supported?Yes
Descriptions supported?Yes

Example

. | A (Key name) | B (English)             | C (German)                | D (Comment)             |
--------------------------------------------------------------------------------------------------
1 | app_title    | My Software Project     | Mein Software Projekt     | This is the main title  |
--------------------------------------------------------------------------------------------------
2 | greeting     | Hello 'User' ! Welcome  | Hallo 'User' ! Willkommen | Be polite               |
--------------------------------------------------------------------------------------------------
3 | ...          |  ...                    |  ...                      |  ...                    |

Params

OptionTypeUploadDownloadDefaultDescription
locale_mappinghashcheckcloseHash mapping each locale name to the column name it is contained in.

Format Options

OptionTypeUploadDownloadDefaultDescription
key_name_columnstringcheckcloseName of the column containing the key name/identification.
comment_columnstringcheckcloseName of column containing comment/description for a key.
first_content_rowintegercheckclose1Index of first row to contain translation content.
enable_pluralizationbooleancheckclosefalseEnables detection of pluralized keys. All matching keys will be persisted as pluralized keys.

Configuration example

An example for the push section in your .phraseapp.yml for XLSX files.

push:
  sources:
    - file: "./en.xlsx"
      params:
        update_translations: true
        format_options:
          key_name_column: A
          comment_column: C
          first_content_row: 2
        locale_mapping:
          en: B

Pluralization

This format uses named categories to identify the different pluralizations of a key. The following categories are reserved for pluralization:

.zero | .one | .two | .few | .many | .other

Example key names:
inbox.messages.notification.one
inbox.messages.notification.other

This way pluralized keys can be identified, persisted and marked accordingly.
Learn more about pluralization?