Thanks to the volunteers who create the translations which make Foldit an internationally accessible game.
Foldit includes several translations, which can be accessed through the Set language button on the game's login screen.
Since translating is a volunteer effort, translations are not updated automatically when there are changes to Foldit. So when new messages are added to Foldit, they appear in English until the translation is updated.
Some translations have been created and shared on the Foldit website, but not included in the game for various reasons.
This page describes how to download and install a translation file. This allows to test and use translations which have not yet been included in Foldit. It's also the first step in Translating Foldit.
Find and download a translationEdit
See the client translation list on the Foldit website. Each of the translations listed there has its own page on the Foldit site.
The page for each translation has links to at least two files:
- "po file" (for "portable object")
- "mo file" (for "machine object")
A translation page may also contain comments about the translation.
The po file is human-readable, and can be added to Foldit. It will have name like foldit.cc.po. Where cc is usually a two-character country code like "fr" or "de". Not all translations follow this convention, however, for example, there's a foldit_german.po on the website.
Download the po file you're interested in, and save it in a spot where you can find it later.
If necessary, rename the file to follow the Foldit convention. So foldit_german.po would become foldit.de.po.
The mo file is not needed to install or work with a translation. It's generated to verify that a po file is formatted correctly.
Locate the Foldit installationEdit
The default location for Windows is C:\Foldit in recent versions of the game.
Older versions of Foldit may use different locations, for example
C:\Documents and Settings\All Users\Application Data\Foldit\ C:\Program Files\Foldit
Windows users can use Windows Explorer to help locate the correct spot, which will contain foldit.exe.
Users on other platforms can use similar tools to help locate the Foldit installation.
Foldit has a similar directory structure on all platforms.
Locate the resources/locale directoryEdit
Translation files are stored in the current resources/locale directory in Foldit.
For Windows, an example of the current resources/locale directory is:
The C:\Foldit component may vary, depending on the location selected when the game was installed.
The resources/locale directory should contain existing translations, with names like foldit.es.po and foldit.fr.po. There will also be a translation template file, called foldit.pot, and some other files.
The resources/locale directory may be replaced by a Foldit software update. The hexadecimal part of the directory will change in the new directory, and the old directory will be deleted.
There's also a base resources/local directory:
This directory does not change, and should not be used for installing translation files.
For non-Windows platforms, the directory structure is similar. Both macOS and Linux use forward slashes ("/") to separate the components of a file path. The resources/locale directory path on these platforms should be something like:
relative to the directory where Foldit is installed.
Copy the translation fileEdit
Using Windows Explorer or a similar tool, copy the translation file for the current resources/locale directory. Again, the translation file should have a name like foldit.cs.po.
Keep a copy of the translation file in a safe location in case the resources directory is replaced by a Foldit software update.
Start or restart Foldit. On the login screen, the Set language button should now display the new translation. Foldit restarts when a new translation is selected.
Note: there is no need to edit the options.txt configuration file to install a new language. Older versions of Foldit required editing options.txt.)
Installing a translation file on Mac and LinuxEdit
The same general steps apply to MacOS and Linux:
- Locate the directory where Foldit is installed
- Locate the current resources/locale directory under the Foldit installation
- Copy the file foldit.cc.po to the resources/locale directory (again, cc represents the "country code", which is really a language code)
- Start or restart Foldit
- Select the new language using "Set language" on the Foldit login screen
Translations for non-European languages such as Chinese, Korean, and Japanese do not work correctly in Foldit for technical reasons. Unfortunately, these problems have persisted for several years.
The system for uploading new translations to the Foldit website is not working as of 7 April 2020. See Portuguese translation translation to the steps to install a new translation file by bypassing the official system.
Foldit may delete a translation file from the resources/locale directory if the file doesn't meet the naming standards. This is another reason why it's best to keep a copy of any translation file outside of Foldit. The exact conditions under which such a deletion occurs is not known at this time. Indications so far are that a file with the format foldit.cc.po may be deleted if the language code used internally is not supported.
Foldit apparently has an internal list of language codes, and even built-in images of the flags of many countries. For example, Foldit displays a Brazilian flag for a translation with the language code "pt_BR" in the po file. The exact list of supported language codes and flags is not known at this time.
Associating a flag with a country and language is culturally insensitive and potentially offensive. As a neutral example, Switzerland has four official languages.