3. How to correctly translate a message
Prev |  | Next

## 3. How to correctly translate a message

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}"?

### 3.1. Menu mnemonics

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 File menu because the underscored letter is `F` (i.e. "`_File`"). In German, the File menu is called Datei 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.

Prev |  | Next
2. Using software other than XMLmind XML Editor to translate the messages | Home | A. The translatexxe command-line utility