The C++ standard library, while supporting locales, has no facility for loading and looking up strings in different languages corresponding to those locales. Boost does not seem to include anything like that, either. Some C++-oriented frameworks have their own internationalization mechanism (e.g. Qt), but if you're not using the whole framework, that's not quite a solution. Many people recommend on falling back on the venerable GNU GetText, a C library.

The past 10 years' advances in C++ have made it possible to write much higher-quality libraries in C++, with very intuitive API. More specifically, std::format as an alternative to both iostreams and the printf() family of functions easily supports changing the order of printed elements dynamically, lending itself to even easier string localization.

So, is there a modern-ish C++ library for doing so?

Required features:

  • C++11 at least
  • Actively maintained
  • Non-tiny userbase
  • Gratis
  • Runs on Linux and Windows
  • Supports RTL languages (e.g. Arabic, Farsi, Hebrew)

Desired features:

  • Designed for even newer C++ versions.
  • Actively developed
  • Large userbase
  • Libre
  • CMake-friendly
  • Widely cross-platform
  • Supports Asian languages (CJK)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.