FreeOTFE logo FreeOTFE
Home | Features | Screenshots | Download | User manual | Contact

Translating FreeOTFE

FreeOTFE, FreeOTFE4PDA and FreeOTFE Explorer all includes support for multiple languages.

At present:

  • Croatian
  • Czech
  • English
  • French
  • German
  • Greek
  • Italian
  • Japanese
  • Russian
  • Spanish
translations are available. With your help though, this can change!

If you are a native speaker of a language other than English, and would like to help out with the FreeOTFE project, please take a look at the instructions below for how to translate the user interface. Even if you do not have the time to translate all of the text used within FreeOTFE, partial translations still have use, and would certainly be appreciated!

Creating a new translation

To translate into a new language:
  1. Download and install the latest copy of FreeOTFE (or FreeOTFE Explorer)
  2. Locate where you installed FreeOTFE, and copy the "default.po" file stored under "locale\en\LC_MESSAGES" to a new directory called:
      locale\XX\LC_MESSAGES
    Where "XX" is the ISO 639-1 Alpha-2 (two-letter) code for the language (e.g. "fr" for French, "de" for German, "ru" for Russian) you intend to translate to.
  3. Edit your new copy of "default.po", inserting the translated versions of each "msgid" string as the corresponding "msgstr" text. For example, a German translation may have:
      #  Example translation
      msgid "Hello world!"
      msgstr "Hallo Welt!"
    

    This process may be carried out using a normal text editor, but it is recommended that a tool such as Poedit (a free software tool for editing ".po" files) is used, as this makes the translation process significantly easier.
    At a minimum, the string for "English" (RS_LANGUAGE) must be translated to reflect the language of the translation - This is important!

To test a translation

  1. Compile your "default.po" file into a "default.mo" file:
    • If you are using Poedit, go to "File | Preferences..." within Poedit, and make sure that the "Automatically compile .mo file on save" option is checked. When you save your "default.po" file, Poedit should automatically generate a corresponding "default.mo" file for you
    • If you are not using Poedit:
      1. Download and install the latest copy of "GNU gettext for Delphi" from http://dybdahl.dk/dxgettext/
        (Note: You do not need to have Delphi or C++ Builder installed to use this software)
      2. In Windows explorer, right-click your "default.po" file
      3. Select "Compile to mo file" from the context menu displayed. This should then generate you a "default.mo" file
  2. Run FreeOTFE.exe
  3. Select the "View | Options..." menuitem
  4. On the "General" tab, select the language of your translation from the dropdown shown in the upper right
  5. Click "OK"
FreeOTFE's user interface should then switch to be displayed in your selected language.

If your translation isn't listed in the "Languages" dropdown, please check:

  • That you translated the word "English" to the name of your language in your "default.po" file
  • You compiled your "default.po" file to a "default.mo" file
  • Your "default.mo" file is placed in the correct "locale\XX\LC_MESSAGES" directory

Submit your translation for inclusion in the FreeOTFE project

Please send your translated "default.po" file to sdean12@sdean12.org for future inclusion in the FreeOTFE project.

Note: You don't have to translate all of the messages stored in "default.po", though it would be very much appreciated!

Updating a Translation

When newer versions of FreeOTFE are released, a translation (.po) file can have newer text strings merged into it using Poedit:

  1. In Poedit, go to "File | Open", and open the "default.po" file with the existing translations in it
  2. Go to "Catalog | Update from POT file" and specify the updated English "default.po" file (i.e. ...\locale\en\LC_MESSAGES\default.po) Note: You may have to set the filter to "All files" when opening this file

Poedit should give you a dialog that shows what strings have been added and removed. If you "OK" this dialog, you should see all the strings merged into the translation as appropriate. Note that Poedit will attempt to default some translations where it can; these are marked as "fuzzy" translations, and should be manually checked to ensure that they are correct.

Additional Notes

  • If you are unsure where any given piece of text is shown in the GUI, please get in touch for specific details of where it can be found.
  • The "&" character is used to prefix the letter will be used as a shortcut key for the control associated with that text (i.e. pressing will select the control associated with the text). Not all translation strings have them, but where they do, only one "&" should appear in the string to be translated. When in doubt, either keep the first instance of this letter in the translated version prefixed with "&", or drop the "&" completely.
  • Acronyms should not be translated (e.g. IV, CDB, PKCS#11)
  • Entries which look similar to:
      Library files (*.dll)|*.dll|All files|*.*
    are filters for use with open/save dialogs. The text descriptions of these filters should be translated, but not the file masks (e.g. "Library file" and "All files" in the above example, but not "*.dll" or "*.*")
  • A number of the text strings include "%1", "%2", etc. These are placeholders which will be replaced with automatically generated text.