diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -17,6 +17,11 @@ * along with opkg-opk. If not, see <http://www.gnu.org/licenses/>. */ +#include "config.h" + +#ifdef ENABLE_NLS +#include <locale.h> +#endif #include <stdio.h> #include <stdlib.h> #include "defs.h" @@ -24,8 +29,6 @@ #include "opk.h" #include "ustar.h" -#include "config.h" - #ifdef HAVE_GETOPT_LONG #include <getopt.h> #else @@ -149,6 +152,15 @@ main(int argc, char *argv[]) int opt; struct opkg_opk_opk *opk; +#ifdef ENABLE_NLS + bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); +#ifdef HAVE_BIND_TEXTDOMAIN_CODESET + bind_textdomain_codeset(PACKAGE, "UTF-8"); +#endif + textdomain(PACKAGE); + setlocale(LC_ALL, ""); +#endif + program_name = argv[0]; control_files = NULL; list_members = 0; |