File Extensions |
.xlsx |
API Extension |
xlsx |
Import |
Yes |
Export |
Yes |
Plural forms support |
Yes |
Description support |
Yes |
Format options |
key_name_column comment_column tag_column first_content_row enable_pluralization export_tags export_max_characters_allowed custom_metadata_columns |
.XLSX is a widely-used file format for localization. Though the layout of an .XLSX file may differ based on specific settings, it generally follows the one-column-per-language convention. To translate .XLSX, provide at least the key name column and one translation column. By default, content is assumed to start in the first row. Along with the keys and translation, meta-information like comments, tags and the maximum characters allowed for the translations can be imported.
The locale_mapping
parameter (of type hashmap) is required to specify which column in the document corresponds to each locale. For examples, see the configuration file example and the API documentation for uploads.
Format Options
Identifier |
key_name_column |
Type |
string |
Upload |
Yes |
Download |
No |
Default |
[empty] |
Description |
Column that contains the key name/identification. |
Identifier |
comment_column |
Type |
string |
Upload |
Yes |
Download |
No |
Default |
[empty] |
Description |
Column that contains comment/description for a key. |
Identifier |
tag_column |
Type |
string |
Upload |
Yes |
Download |
No |
Default |
[empty] |
Description |
Index of the column containing a tag for the key. |
Identifier |
first_content_row |
Type |
integer |
Upload |
Yes |
Download |
No |
Default |
1 |
Description |
Index of first row to contain translation content. |
Identifier |
enable_pluralization |
Type |
boolean |
Upload |
Yes |
Download |
No |
Default |
true |
Description |
Enables detection of pluralized keys. All matching keys will be persisted as pluralized keys. |
Identifier |
export_tags |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
false |
Description |
Exports tags along with keys and translations. |
Identifier |
export_max_characters_allowed |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
false |
Description |
Exports the key character limit along with keys and translations. |
Identifier |
custom_metadata_columns |
Type |
hash |
Upload |
Yes |
Download |
Yes |
Default |
[empty] |
Description |
A hashmap of custom metadata values that need to be imported or exported:
|
Structure example
key_name |
en_US |
de-DE* |
comment* |
tags* |
max_characters* |
---|---|---|---|---|---|
app_title |
My Project |
Mein Projekt |
This is the main title |
app, title |
30 |
greeting |
Hi 'User'! |
Hallo 'User'! |
Be polite |
*optional columns
The spreadsheet file needs at least the key column and one language in order to be uploaded. Apart from additional languages, the following columns can be added to add meta information:
-
comment: to add a description to the key
-
tags: to add tags to individual keys in the file
-
max_characters: to set a character limit for a key through the upload
Configuration example
An example for the push section in a .phraseapp.yml for XLSX files.
push: sources: - file: "./en.xlsx" params: file_format: xlsx update_translations: true format_options: key_name_column: A comment_column: C first_content_row: 2 tag_column: D locale_mapping: en: B