Skip to main content
All CollectionsText managementGeneral
How to create a text segment via the editor?
How to create a text segment via the editor?
Updated over a week ago

With Lingohub, you can create new text segments by integrating your Lingohub company with repositories or apps or by creating them while working with the Lingohub editor.

Within the editor you have two options:

  1. Manual adding the new text segments (up to 20 at once);

  2. Uploading a CSV file with up to 20 entries.

To create the text segment via the editor, follow the steps below.

  1. Move to the editor and click on the plus icon at the top-right corner.

  2. Select the project (and container if you have more than 1) to which you want to add new segments and upload or drag and drop the CSV file.

  3. Click "Next."

    Note: You can also click "Next" without uploading a CSV file, then you will be moved to the page with interface for text segments adding.

4. At this step, if you are using the CSV file, all the necessary fields will be filled automatically, while with the manual uploading, you have to add the following information:

  1. Segment key

  2. Segment text

  3. Status - "Approved" or "Draft" (by default, it will be chosen the status based on the project settings)

  4. Plural rules.

5. Click "Create segments"

The requirements for CSV files for segments creating

To upload the text segments as a CSV file, ensure that the file contains 20 or fewer text segments and is up to 5MB. Lingohub will reject any extra segments after 20.

To successfully upload the CSV file, it should contain the following headers: "groupKey," "segmentKey," "plural," "status," and "sourceContent."

  • "groupKey" — is an optional column for formats with a segment and a group key, such as 1. Gettext PO, 2.Qt Linguist TS, 3. Standard INI, 4. Twine TXT.

    It is also optional for projects with no group key like 1. Android XML, 2. iOS Strings, 3. iOs Stringsdict, 4. Standard Properties, 5. Windows RESX, 6. Define PHP, 7. Standard ARB, 8. Chrome i18n JSON, 9. Go i18n JSON, and 10.Standard CSV.

  • "segmentKey" — always required.

  • "plural" — optional. This column can have values "TRUE" or "FALSE." By default, the value is false.

  • "status" —is an optional column describing the source content's status. This column can have values "draft" or "approved." The status will be determined based on the project settings if no value is specified.

  • "labels"— optional. If you want to add more than 1 label, use the hooks and commas, for example - "red label,blue label,new"

  • "sourceContent" — is an optional column that contains the text segment content. If no values ​​are added for this column, you will get empty text segments during import.

Note: For projects with a hierarchical structure like YAML, JSON or XLIFF formats the user needs to enter the key in the segment key column. Groups will be separated by dots. If a part of the key should not be split, it must be escaped using quotation marks.

Awesome! You have finished the article about creating a new segment. If you have any questions, please contact us via [email protected]

Did this answer your question?