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
gettext
using your system's package manager. For example, in Debian/Ubuntu:
In Fedora:
`sh
sudo dnf install gettext
- Compile the
.po
file to.mo
: - Use the
msgfmt
command to compile the.po
file to.mo
. Make sure you are in the directory where your.po
file is located or provide the full path to the file.
- This command will generate a
ckanext-openapi.mo
file in the same directory as the.po
file.
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
.po
File:
- Compile the
.po
file to.mo
:
Verification¶
- Verify that the
.mo
file has been generated in the browser.