Let's use the following message as an example of what to do:
Overwrite existing file "{0}"?
If you have used the translatexxe command-line utility to generate a text file, the above message will look like this:
Overwrite existing file\n\ "{0}"?
Let's suppose you have translated it to French as follows:
écraser le fichier existant {0}
The above translation has several mistakes:
Word "écraser" must be capitalized.
The word capitalization used in the original message must be reproduced in the translated message.
Variable {0}
must be quoted and the sentence must end with a question mark.
The punctuation used in the original message must be reproduced in the translated message.
Words "fichier existant" must be followed by a newline character.
If the original message is split into several lines, then the translated message must be split into the same number of lines. Moreover, these lines must have roughly the same length as those of the original message. Failing to do so may cause XXE to display very wide dialog boxes.
The correct translation is:
Écraser le fichier existant "{0}"?
If you have used the translatexxe command-line utility to generate a text file, the correct translation is:
Écraser le fichier existant\n\ "{0}"?Note that what follows, though less readable, is correct too:
Écraser le fichier existant\n"{0}"?
Some messages contain one underscore character ('_
'). Menu examples: "_File
", "_Edit
", "_Search
". Menu item examples: "_New
", "_Open...
", "_Save
", "Save _As...
". Such messages are labels for menus, menu items and buttons. The underscore is located just before the letter which is used as a mnemonic.
Recommendations:
The location of the underscore depends on the target language.
Example: in English, Alt+F opens the menu because the underscored letter is F
(i.e. "_File
"). In German, the menu is called and the underscored letter could be D
(i.e. "_Datei
").
Only letters A
to Z,
a
to z
and digits 0
to 9
may be underscored. Do not underscore accented letters (examples: É
, à
).
Do not underscore the same letter, no matter its case, twice in the same GUI component (same menu bar, same menu, same dialog box, etc).
Because all the above constraints are quite difficult to satisfy, it is better not to use this facility at all rather than using it inconsistently. In conclusion, if you find that specifying mnemonics this way is too tedious, then do not hesitate to drop the underscore character from all the messages you'll translate.
The main tool bar contains button groups having captions (e.g "File", "Edit"). Some of the buttons have short descriptions (e.g. " ", " ").
The corresponding messages must be kept very short — at most two words long (about 20 characters) — and must have all their words capitalized. For example, translate "Find & Replace
" to "Rechercher & Remplacer
" and not by "Rechercher et remplacer
".