GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

A string, for example "hello world" is set to be translated by calling a special function, named _ for GiD strings, and = for problemtype strings.
To call this function must enclose it with [ ], for example:
[_ "Hello Word"]
for a GiD script, or
[= "Hello Word"]
for a problemtype script
For a problemtype the source code is scanned to find [= ] instead [_ ]
It's possible to add to the string some special format % characters
set numfiles 3
[_ "Copied %d files" $numfiles]
If the source and the translated strings have different % format, the program using this translation can crash at runtime.
To avoid this situations there is menu:
Messages -> Check format
To search inconsistent (in format) translated sentences.
For example it's a bug to translate the sentence "Copied %d files" to "Copiados %f ficheros", because %d expect an integer, and %f expect a real number.

  • No labels