Soluling home   Document home

Composite format strings / Interpolated strings

Composite format strings / Interpolated strings

Use this sheet to specify how comment values of composite format strings and interpolated strings are checked.

Composite format strings / Interpolated strings comment check

Specifies how the comment value of composite format strings / interpolated strings are checked. Possible values are:

Value Description
None Comments are not required, and they are not checked.
Comment value required Comments are required, but the content of the comments are not checked.
Placeholder description required

Comments are required, and the content of the comments is checked. For each placeholder, you have to have the following text in the comment: index/name comment
where
index is the placeholder index. The plain number is recommended, but the actual string can be anything, but there must be a number such as 0, {1}, {{0}}, %1:s, etc.
name is the placeholder name.
comment is the description of the placeholder.

The following table contains some samples. Sample string contains the actual resource string value. Sample comment contains a comment string that the checker accepts. Required characters (i.e., placeholder index) are marked with bold typeface.

Platform Sample string in code Sample string in edit grid Sample comment
.NET Hello {0}, welcome to {1} Hello [0], welcome to [1]
<data name="Str" xml:space="preserve">
  <value>Hello {0}, welcome to  {1}</value>
  <comment>0: Name of the  person, 1: Name of the place</comment>
</data>
Angular Hello {{name}}, welcome to {{place}} Hello [name], welcome to [place]
<p i18n="name: Name of the  person, place: Name of the place">
  Hello {{name}}, welcome to  {{place}}
</p>
Delphi Hello %s, welcome to %s Hello [0], welcome to [1]
resourcestring
SStr = 'Hello %s, welcome to %s'; //loc
0: Name of the person, 1: Name of the place
WiX Hello [name], welcome to [place] Hello [name], welcome to [place]