Language TranslationIntroductionSome components of DMail, including DList, DPOP and DSMTP, feature language translation. This is quite simple in operation; phrases which these products generate can be replaced by user specified phrases. This behaviour is specified in language files. Contents
What Is A Language File?A language file consists of pairs of phrases, and comments prefixed by '#'. For example: # This is a sample language file How Does Translation Work?If given a phrase to translate (say, %s has %d post office messages), the product will search through the pairs until it finds the line containing the phrase. It will then use the next line as the translation (in this case, %s hat %d Postmeldungen). Language files are cached to prevent frequent disk access. Only 10 language files remain in the cache at any one time. For this reason, we recommend that no more than 10 language files be used for each product (i.e. 10 for DList, 10 for DPOP, and 10 for DSMTP). How Do I Get A Language File?All DMail components that feature language translation are supplied with default language files. See your DMail directory (e.g. \dmail or /usr/bin/dmail). These contain a list of all translatable phrases and translated phrases, in the following format: %s has %d post office messages How Do I Modify A Language File?All language files are in ASCII text, and can be modified with any good text editor. All you need to do is change the translations from the default values into the values which you choose. It is generally best to follow this procedure in order: Original File%s has %d post office messages Translation of: %s has %d post office messages %s password wrong or not a valid user Translation of: %s password wrong or not a valid user
NOTE CAREFULLY:
How Do I Use Language Translation With DLIST?When creating your lists.dat file, simply add a language_file setting to each list you want translated. This setting specifies the location of the language file to use for that list. For example: list newproducts For further information on this setting, see http://www.netwinsite.com/dmail/dlist.htm. How Do I Use Language Translation With DPOP?You need to add a language_file_dpop setting to dmail.conf. This specifies the language file that DPOP will use. For example: language_file_dpop german.dat For further information on this setting, see http://www.netwinsite.com/dmail/dp_set.htm. |