Formatting and string substitutions

"Formatting" refers to the situations where the software application constructs a string by inserting things into a format string.  Two types of format strings are supported by poTree:

·         c-language printf-style formats.

·         pf-format string substitution formats.

Refer to your favorite c-language documentation for information about c-language formatting.

The second type of formatting, pf-format, is used in The Panorama Factory.  This is a very simple position-independent string formatting feature.  It’s important to use position-independent formatting in a message catalog because translated word order may be different from the English.

%1 ... %9

Insert string number 1...9.

%1!fmt! ... %9!fmt!

Insert formatted argument number 9 using a c-language style format.  Only integer formats are guaranteed to work properly.

%n

Insert a newline.

%t

Insert a tab character.

%<other>

Insert the character unchanged.  This allows you to insert a percent character, for example, with "%%".

When as string is marked has having c-format or pf-format, poTree checks to be sure that the format specifications are valid for the type of formatting and that the format specifications in the translation are consistent with the original string.

Use the c-format command or pf-format command (the Edit menu) to add or remove format checking from a string.



© 2006-2007, Smoky City Design, LLC
Updated: May 16, 2007