dp_intl
dp_intl is a Gettext-compatible internationalization library for C++, intended as an enhanced version of the Gettext runtime library (libintl). It does not depend on the locale, uses 64-bit integers for plural form routines on all platforms, reads files through a virtual stream class so it is not tied to the local file system, and allows any language in source strings.
What it addresses
Gettext requires setlocale(), which alters the behavior of other locale-dependent C routines and causes subtle locale-specific bugs; its plural form routines use unsigned long, which breaks numbers above 2³² on platforms with 32-bit unsigned long; it is tied to the local file system; and its plural form routines are limited to English-like languages for source strings.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
dp_intl
dp_intl is a Gettext-compatible internationalization library for C++, intended as an enhanced version of the Gettext runtime library (libintl). It does not depend on the locale, uses 64-bit integers for plural form routines on all platforms, reads files through a virtual stream class so it is not tied to the local file system, and allows any language in source strings.
Problem: Gettext requires setlocale(), which alters the behavior of other locale-dependent C routines and causes subtle locale-specific bugs; its plural form routines use unsigned long, which breaks numbers above 2³² on platforms with 32-bit unsigned long; it is tied to the local file system; and its plural form routines are limited to English-like languages for source strings.
Posted by @danpla · Original source ↗
Story title · @danpla · · Source ↗
Show HN: dp_intl – Gettext-compatible internationalization library for C++
Submitted URL · @danpla · · Source ↗
https://danpla.github.io/dp_intl/
Source text · @danpla · · Source ↗
dp_intl is intended to be an enhanced version of the Gettext runtime library (also known as libintl), with the following improvements
Source text · @danpla · · Source ↗
dp_intl does not depend on the locale.
Source text · @danpla · · Source ↗
dp_intl uses 64-bit integers for plural form routines on all platforms.
Source text · @danpla · · Source ↗
Unlike Gettext, dp_intl is not tied to local file system: it reads files through a virtual stream class that can wrap any file-like object
Source text · @danpla · · Source ↗
dp_intl allows any language in source strings.