Overview over different language related features

Internationalization support

For internationalization / localization support in open source software projects under Linux libintl is used. This means that the text output of the application might be translated to different languages. It handles both internationalization (i18n) and localization (l10n). See http://www.labri.fr/perso/fleury/posts/programming/a-quick-gettext-tutorial.html

  • uClibc-ng includes a stub implementation, you need to enable UCLIBC_HAS_LIBINTL
  • musl implements libintl
  • glibc includes the libintl library

The stub implementation included in uClibc-ng is gettext-tiny. You can use gettext with uClibc-ng systems, but need to enable locale support to have translation support on your system.

You could also use gettext: https://www.gnu.org/software/gettext

Header: libintl.h Functions: *gettext(), bindtextdomain(), textdomain()

Locale support

For a working internationalization / localization support you need locale support in your C library. The environment variables LC_ALL, LC_xxx, LANGUAGE and LANG are used to set-up the localization of the user environment.

  • uClibc-ng has experimental locale support, you need to enable UCLIBC_HAS_LOCALE
  • musl has locale support
  • glibc has locale support

Header: locale.h Functions: setlocale()/localeconv(), newlocale()/freelocale()/uselocale()/duplocale()

International conversion support

Standard programming API to convert between different character encodings. https://en.wikipedia.org/wiki/Iconv

  • uClibc-ng has basic iconv support, you need to enable UCLIBC_HAS_LIBICONV
  • musl has iconv support
  • glibc has iconv support

The iconv implementation in uClibc-ng is based on libiconv-tiny. Only conversion from and to UTF-8 are supported.

You could also use libiconv: https://www.gnu.org/software/libiconv/

Header: iconv.h Functions: iconv_open(), iconv(), iconv_close()

Internationalized domain name support

See https://en.wikipedia.org/wiki/Internationalized_domain_name

There are two different implementations for IDN under Linux. libidn and libidn2. And it seems libidn is deprecated.

The C library might provide support for IDN in getnameinfo() and getaddrinfo().

  • uClibc-ng does not support IDN
  • musl does not support IDN
  • glibc includes libidn library as an addon