Translations
Development¶
Update Internationalization (i18n) Files¶
To compile a .po file to a .mo file in the terminal, you can use the msgfmt tool, which is part of the gettext package. Here are the steps to do it:
Steps to Compile .po File to .mo File.¶
- Install
gettext(if not already installed): - On most Linux distributions, you can install
gettextusing your system's package manager. For example, in Debian/Ubuntu:
In Fedora:
`sh
sudo dnf install gettext
- Compile the
.pofile to.mo: - Use the
msgfmtcommand to compile the.pofile to.mo. Make sure you are in the directory where your.pofile is located or provide the full path to the file.
- This command will generate a
ckanext-openapi.mofile in the same directory as the.pofile.
Complete Example¶
Let's assume your .po file is located in the i18n/en/LC_MESSAGES/ directory inside your project. Here are the complete commands:
-
- Navigate to the Project Directory:
- Navigate to the Directory Containing the
.poFile:
- Compile the
.pofile to.mo:
Verification¶
- Verify that the
.mofile has been generated in the browser.