4.10.2. Multiple Human Languages

Sometimes, we want to prepare the same document in several human languages. Interscript cannot translate English to German, for example, so it is necessary to provide documentation text in both languages. The program codes, however, are usually in common, except possibly for comments.

Interscript can generate a multiple versions of a single document (and each version will be generated in all the selected formats) using the same tagging mechanism that is used to control raw output. You can write sections of English documentation after that command @enableif('English') and sections of German version after the command @enableif('German'), and this will disable all weavers not supporting the nominated protocol.

This mechanism applies to interscript program code comment commands. The commands generate ordinary woven text, but are also inserted into the tangled output files. In this case, comments will be inserted in the selected language or languages. Be aware that while this will not change program semantics it will change the physical source file.

It is also possible to generate string constants in different human languages with interscript, but this is a tangler function, having no special effect on weaving: because of the complexities of this issue, it must be effected using python script crafted by the author for this purpose ... in other words there are no special commands for it :-)