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.
Application texts. These are used for various function and menues in the Web Viewer and are based in Signifikant’s translations. Currently supported languages are found here: Custom texts and available languages
Custom application texts. This is when an application text does not fit customer’s needs. Custom texts will override the application texts. It is also for some functions possible to define keytexts in profile.config, and such keytexts shall be defined as a custom text. See here for more information: Custom texts and available languages
Data texts. These texts are name of parts, specifications on parts, name of kits, products and selected lead texts as the text in the start page. These texts are updated in the Manager application. See this article.
Texts from API. Eg error messages from integrations come as a part of an API resonse. In this case Web Viewer simply show what is returned. See here for a description of options: General objects and attributes | Texts returned in calls
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
Data and document language
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.
Web viewer language
The languages available in the web viewer are defined in profile.config and in web admin. The settings controlling the available languages is: SuppressedUILanguages
A sample configuration is as below. Web viewer will show all available languages excluding the ones in the below configuration.
<SuppressedUILanguages>
<Language>en-US</Language>
<Language>bg</Language>
<Language>cs</Language>
<Language>el</Language>
<Language>et</Language>
<Language>hr</Language>
<Language>ja</Language>
<Language>ko</Language>
</SuppressedUILanguages>
Available languages are: Custom texts and available languages | Language codes
Please also note that you may need to chech the language area of web admin as well in version 5.4.
Languages in import
Imports will only import valid languages, and valid languages are defined in import.config, using the ValidLanguages
tag.
<XmlConfig>
<ImportSetting>
<LanguageSettings>
<!-- If no language specified, use this -->
<DefaultTextLanguage>en-GB</DefaultTextLanguage>
<!-- Do not allow to create new languages at import -->
<AutoAddNewLanguage>false</AutoAddNewLanguage>
<!-- Only this list of languages will be allowed at import -->
<AllowOnlyValidLanguages>true</AllowOnlyValidLanguages>
<ValidLanguages>
<Languages>da-DK,nl-NL,en-GB,fi-FI,fr-FR,de-DE,it-IT,nb-NO,pt-PT,es-ES,sv-SE</Languages>
</ValidLanguages>
</LanguageSettings>
</ImportSetting>
</XmlConfig>
Note that import.config typically is included in automated deploy, so changes made manually may be overwritten at updates if not adjusted on Signifikant’s environments.
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.
Export and import
Export texts
It is possible to export all texts using the context menu in the text storage.
Select which texts to export by selecting lines in the storage.
Right click and select the Export option
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 |
---|---|
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.
In text storage right-click and select Import.
In the dialogue select which folder to look for import files.
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