How to create KeePass 1.x translations
Creating a New KeePass 1.x Translation
First of all send an e-mail to the KeePass developer to request a source language file.
The KeePass developer will send you a file called "GermanSrc.lng". Copy this file and rename it to "<YourLanguage>.lng". Now open it with your favorite text editor.
You can see strings, delimited by '|' characters. First there are English strings, surrounded by two '|' characters. These strings are followed by the translated ones, also surrounded by '|'.
You now just need to replace all German strings by the ones of your language. Do not edit the English ones!
There are a few special fields, which should not be translated one-to-one: |~LANGUAGENAME|, |~LANGUAGEVERSION|, |~LANGUAGEAUTHOR|, |~LANGUAGEAUTHOREMAIL|. These values should be "translated" to the correct information of your language file, i.e. ~LANGUAGEAUTHOR should "translate" to your name. ~LANGUAGEVERSION should contain the KeePass version, for which the translation has been created for, etc.
The language file must be UTF-8 encoded. KeePass 1.04 and higher only support UTF-8 encoded files.
If your text editor doesn't support UTF-8 encoding or you don't know how to save it in that format, please follow these steps:
That's it. Your language file now is UTF-8 encoded.
Updating Existing Translations
To update translations (when a new KeePass version is released that requires an updated version of your translation) a utility called "ChkTrans" is used. This utility will check your translation file to see if you have translated all strings, and it makes a nice report which strings you haven't translated or which strings aren't needed any more.
Go to the KeePass translations page: http://keepass.info/translations.html.
On the bottom of this page you can download the ChkTrans utility.
Additionally download the latest "language reference file". You can also find it on the bottom of the translations page.
This package contains a "language reference" file. This file is used by the ChkTrans utility to compare the latest strings against your translation.
When you have downloaded the above two ZIPs, unpack them into the same directory where your translation file is.
If you are, for example, the French translator you would execute the
utility like this (from the command line):
The utility will then analyze your language file and write all errors into an output file called "Report.txt" in the same directory. This file reports all strings that you forgot to translate, which you forgot to remove, etc.
If you have made a valid translation file the utility will say something like "You have made a 100% perfectly valid translation", otherwise it just reports that there were errors and you must have a look into the 'Report.txt' file for more information.
And now what if a new version of KeePass is released? Simple: you get the latest language reference file. You run the ChkTrans utility and get a nice report which strings are missing and outdated. You now edit your translation until the ChkTrans utility thinks that it's fine.