There's two libraries provided, KI18n for Gettext-based text internationalization, and KI18nLocaleData for access to data about countries and timezones.
KI18n provides functionality for internationalizing user interface text in applications, based on the GNU Gettext translation system. It wraps the standard Gettext functionality, so that the programmers and translators can use the familiar Gettext tools and workflows.
KI18n provides additional functionality as well, for both programmers and translators, which can help to achieve a higher overall quality of source and translated text. This includes argument capturing, customizable markup, and translation scripting.
If you are using CMake, you need to have
find_package(KF5I18n NO_MODULE) ki18n_install(po)
(or similar) in your CMakeLists.txt file, and you need to link to KF5::I18n.
KI18nLocaleData provides access to information about:
- Countries as per ISO 3166-1, via KCountry.
- Country sub-divisions as per ISO 3166-2, via KCountrySubdivision.
- IANA timezones, via KTimeZone.
These elements can be looked up via their corresponding standardized identifiers, geo coordinate or (localized) name.
Besides the C++ API, a QML API is also available.
Some of this information is read from iso-codes at runtime, so the iso-codes data files and translation catalogs need to be installed.