I18N#
Internationalization and Localization functions leveraging GNU Gettext.
Info
To use declarations from this page, include the <essence/i18n.hpp> header.
-
template<typename ...Args>
std::string _(const char *msgid, Args&&... args)# GNU Gettext wrapper accepting std::format arguments.
Example
std::string name = "Will"; std::string my_message = _("Hello {}!", name);
-
template<typename ...Args>
std::string _n(u64 n, const char *singular, const char *plural, Args&&... args)# GNU NGettext wrapper accepting std::format arguments.
Example
std::string program_name = "file-processor"; u64 count = 100; std::string message = _n(count, "{}: Processed {} file.", "{}: Processed {} files.", count, program_name);