About custom string files

Build 1501 on 14/Nov/2017  This topic last edited on: 6/Sep/2016, at 13:33

When you add new objects, attributes or elements to a schema, you need to provide for the auto-translation of the schema technical names to the human readable names, e.g.

Example: the object name is mySet, but you want it to appear in the user interface as ExtraOrdinary Set. Then, create a custom string file with an arbitrary name, but following the required line syntax, e.g.

<StringDesc Scope="ObjTypeCaption" Name="lwSubLocation" Value="Sublocation" />

and add the lines for the added attribute in every string scope.

Note: if you add 10 attributes, yuu may need to add 30 lines (three per attribute).

Syntax rules

The line starts with <StringDesc

The line continues with Scope="<scope_name>"

The line continues with the attribute name Name="<attrname>"

The line ends with the translated name in form of Value="<translated_name>" />

For the available scopes, see About string scopes.

If the language is not set in the string, it takes the default language.

To set the string language, use the following syntax:

Language="<language_name>"

where <language_name> can be it, en or other standard language shortcut.

Example of a custom string file

<?xml version="1.0"?>

<StringList 

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 

  xmlns="http://www.teradp.com/schemas/GN4/1/StringList.xsd">

 

  <!--

  #### Strings corresponding to schema elements (object types, attributes and enumerations)

  #### defined in LWGN4.xsd

  -->

 

  <!-- Object type name translation used as a caption -->

 

  <StringDesc Scope="ObjTypeCaption" Name="lwSubLocation" Value="Sublocation" />

  

  <!-- Object type name translation used inside a message -->

 

  <StringDesc Scope="ObjTypeMsg" Name="lwSubLocation" Value="Sublocation" />

  

  <!-- Object attribute name translation used as a caption -->

 

  <StringDesc Scope="ObjAttrCaption" Name="lwSubLocationRef" Value="Sublocation" />

  <StringDesc Scope="ObjAttrCaption" Name="lwWebRelated" Value="Web Related" />

  <StringDesc Scope="ObjAttrCaption" Name="lwStoryType" Value="Story Type" />

  <StringDesc Scope="ObjAttrCaption" Name="lwPostCode" Value="Postcode" />

  <StringDesc Scope="ObjAttrCaption" Name="lwWebTitle" Value="SEO title" />

  <StringDesc Scope="ObjAttrCaption" Name="lwWebCaption" Value="Web Caption" />

  <StringDesc Scope="ObjAttrCaption" Name="lwWebLink" Value="Web Link" />

....

</StringList>