Not getting lost in translations
summary
Describes a library that preserves compile‑time checks of std::format while allowing runtime language selection by compiling gettext PO/MO data into the binary and using a compile‑time hash of format texts. Uses the Unicode CLDR plural rules to pick plural forms, implements a format_string_translator that finds the plural argument via template pack folding and converts heterogeneous arg packs to an indexable array, and runs a compile‑time integration test over ~500 translations to validate behavior on MSVC/Clang/GCC toolchains.
AI-written summary · about
chapters (12)
- 0:00Machine translation software
- 3:01Company founding and architecture
- 6:12Choosing text files
- 15:07Boost.Format limitations
- 18:22Template metaprogramming costs
- 23:24String formatting in C++20
- 26:00Constant evaluation in compilers
- 31:23Compile-time translation design
- 40:09Heterogeneous type sequences
- 48:46Pattern matching for translation
- 54:32Compile-time testing
- 57:46Conclusion
related talks
01h 01m“A modern formatting library for C++”
50mPlenary: C++ MythBusters
03mLet's cmakeify the C++ standard library
41mC++11 Metaprogramming Applied to Software Obfuscation
01h 21mC++ MythBusters
01h 16mPolymorphism, Cohesion, and Coupling in C++
38mPersistent Representation of C++ for Fun and Profit
51mTypical C++, but Why?
