The Internationalization (I18n) of npmount is based on GNU gettext.
Given the simplicity of the User Interface and the small number of possible error messages (not counting those emitted by the C library, which are already internationalized), it is not foreseen to provide localization (L10n), but only the internationalization, which means that from a complete description of a language and a region (eg "pt_BR"), we retain only the language part (eg "pt"). A complete language definition as contained in the LANG variable, also contains an encoding; we assume that all encodings other than utf-8 are deprecated and provide only the utf-8 encoding.
Therefore "fr_FR.ISO8859-1" and "fr_CA.UTF-8" will both lead to "fr" and the text will be encoded in utf-8, which will cause errors if the users's encoding is ISO8859-1.
Go to the subdirectory po ; then execute msginit -o language.po, where
language is the two-letter acronym of the language; for example:
msginit -o pt.po . Then edit the newly created file.
This file contains a header with some template you should fill, like the name of the translator (you). Then, for every message which can be issued by the program, there are two lines:
msgid "the original message in english"
msgstr ""
It is up to you to fill the string following msgstr with the translation
of the string following msgid in the line above.
Some strings are simple formats of the C printf() function. You should be
familiar enough with the C language to understand what it means: %s is a
place-holder for some text elaborated at run time. When its meaning is not
obvious, a comment above explains it. This comments has the form
/* Translators: explanation */
When you're done, you can re-build and re-install npmount, and it will speak your language.
If you want also to translate the man page, go to subdirectory man. The
man page in English is in the file "jargon". This artefact is needed for
installation because the English man page is always installed, and in a
location which is different of the other languages and a mess would occur
at install time if the LANG variable meant some variant of English.
Your man page should be named by the two-letter acronym of you language, for
example es.