gettextize
Prepare a program for translation
SYNOPSIS
gettextize [options]
PARAMETERS
--help
Display help information and exit.
--version
Display version information and exit.
-f, --force
Overwrite existing files (POTFILES.in).
-c, --copy
Copy all needed files (gettext.sh, install-sh).
DESCRIPTION
The gettextize command is a utility used to prepare a package for internationalization using gettext. It adds the necessary files and directories to a project, allowing you to extract translatable strings from your shell scripts (or other sources) and generate message catalogs (.po files) that can be translated into different languages. It assists with the process of enabling linguistic diversity.
It creates a 'po' directory containing a POTFILES.in which list files to be used to create .pot files.
Once gettextize has prepared the project, other gettext tools like xgettext can be used to extract translatable strings. The primary goal is to create a suitable structure for managing translations of text used in your software, which is crucial to reach a global audience.
CAVEATS
gettextize requires that you have gettext installed on your system.
Running gettextize is normally the first step and the process is not reversible.
WORKFLOW
1. Run gettextize to prepare your project for internationalization.
2. Use xgettext to extract translatable strings from your source files.
3. Create .po files for each language you want to support.
4. Translate the strings in the .po files.
5. Use msgfmt to compile the .po files into .mo files (machine object format).
6. Install the .mo files in the appropriate directory on the target system.
7. Set the LANGUAGE environment variable to select the appropriate language at runtime.
HISTORY
gettext and related tools (including gettextize) were developed as part of the GNU project to provide a standard framework for internationalization and localization of software. gettextize automates repetitive and tedious steps. The exact release date and initial author are hard to pin down as it evolved as a part of the larger gettext suite.