Working with texts and languages

This guide gives an introduction in how to work with texts, languages, and translations in Signifikant. This article gives an overview and further describes data texts.

Overview

There are several types of texts in Signifikant.

Fallback handling

When presenting a text in Web Viewer, Web Viewer will try to present the text in the language the user has selected. If no translation of the text in selected language exist, Web Viewer will check if text has an invariant translation and use that translation. If no invariant translation exist, Web Viewer will fall back to default language. Default language is defined in profile.config and is typically set to an english language variant as en, en-GB or en-US.

This strategy is applied to all texts.

Adding languages

Available languages are defined in the language storage. Languages may be

  • data languages - for all texts found in the database, i.e. part names, catalogue names, descriptions, specifications, ...

  • document languages - the options available for translated versions of document files

To add a new language, select new in the context menu in the storage and add the code for the language. Accepted languages are according to ISO 639-1 alternatively ISO 639-1 and ISO 3166.

E.g. ISO 639-1 two letter language code as "en" or ISO 639 and ISO 3166 four to eight letter language and culture codes as "de-DE" or "sr-Latn-RS".

Languages may be changed or deleted. Note that translations or documents for a changed or deleted language will not be affected.



Changing languages warning

Changing a language will not make documents of that language to be changed or moved in the file system. Instead these documents will remain at their existing location and with their existing language definition.

Deleting a language will not remove documents from the file system.

Working with texts

Each text contains all its translations, a language invariant translation and a persistent id. The usage of the persistent id is to allow for external translations databases which have an id for texts and also handle the situation when a word is the same in one language but different in others.

When new texts are created manually no persistent id is added. This must be done manually or in an external translations database.

 

Maximum text length

There is a limit on how long texts can be. Currently the limit is 900 bytes, equal to about 450 characters.

Reason is a limitation in SQL, where an SQL index cannot be used on fields longer than 900 bytes.


Text storage

All texts are available as a table in the text storage. The text repository may be used to

  • add new texts,

  • alter texts, change, or add translations,

  • create a new text as a copy of an existing text,

  • delete a text, 

  • replace references to a text to another text, in all places the text is found in the database,

  • find where a text is used thought the "Find references" function.

In all repositories with fields to add texts it is also possible to use or add new texts to the text storage.

Text fields

By entering a text in e.g. a name field a drop down will appear showing existing texts that matches the entered text. The drop down will give an indication on how the text is used. Texts marked with  are not in use while texts with  are not fully translated.

By entering a text that does not exist in the text storage and pressing enter, a dialogue will appear. This dialogue will allow the user to add a new text, complete with translations, or as an language invariant text.



Ctrl-enter to create a copy of a text

It is also possible to create a new text which is a copy of an existing text:

  1. Add an existing text in a text field.

  2. Press ctrl-enter.

  3. A dialogue will appear to add a new text and the dialogue will be prefilled with the translations of the existing text.

  4. Now the user may create the new text, with the existing text as a template, i.e. adding to or changing wording of a phrase.

 

Export and import

Export texts

It is possible to export all texts using the context menu in the text storage.

  1. Select which texts to export by selecting lines in the storage.

  2. Right click and select the Export option

  3. Select the format of the export files. Two export formats are supported: XLIFF and Signifikant Simplified XML in version 4.5 and earlier. In version 5.0 and later Excel is added as an option.

Formats

Format

Description

Format

Description

XLIFF

XLIFF will use a source language and create one xml file per language with the source language added as a reference. XLIFF does not contain any ID.

Signifikant Simplified XML (SSX)

Signifikant Simplified XML will allow user to select to create one xml file per language or one xml file with all languages. The persistent-ID of each text will be included in the export.

Excel

An excel file with each language as a column will be produced. persistent-ID and database-ID will be included in the export as separate columns. Note that the two line page headers must remain if the same file is to be imported again.

Excel option exist in version 5.0 and later.

Import texts

The import function in the will allow to import XLIFF (one language per file), Signifikant Simplified XML (one or several languages per file) or Excel (version 5.0 and later). The import function may be started by

  • selecting import in the context menu in text storage (SSX, XLIFF, Excel)

  • using import repository (SSX and XLIFF)

  • using APIs to initiate imports (SSX and XLIFF)

In Manager text storage follow these steps to import.

  1. In text storage right-click and select Import.

  2. In the dialogue select which folder to look for import files.

  3. All files in the folder which are of XLIFF, XML or Excel format will be listed in a dialogue. Select the files to import.

Now the texts with the translations will get imported.

 

Sample XML

Sample XML files for import can be found here:

Technical documentation - Signifikant Simplified XML - SSX