Warning, /frameworks/ki18n/README.md is written in an unsupported language. File is not indexed.
0001 # KI18n 0002 0003 There's two libraries provided, KI18n for Gettext-based text internationalization, 0004 and KI18nLocaleData for access to data about countries and timezones. 0005 0006 ## KDE Gettext-based UI text internationalization 0007 0008 ### Introduction 0009 0010 KI18n provides functionality for internationalizing user interface text 0011 in applications, based on the GNU Gettext translation system. 0012 It wraps the standard Gettext functionality, so that the programmers 0013 and translators can use the familiar Gettext tools and workflows. 0014 0015 KI18n provides additional functionality as well, for both programmers 0016 and translators, which can help to achieve a higher overall quality 0017 of source and translated text. This includes argument capturing, 0018 customizable markup, and translation scripting. 0019 0020 ### Usage 0021 0022 If you are using CMake, you need to have 0023 0024 find_package(KF5I18n NO_MODULE) 0025 ki18n_install(po) 0026 0027 (or similar) in your CMakeLists.txt file, and you need to link to KF5::I18n. 0028 0029 When using QML, the QML Engine has to be setup for using i18n methods, which is done by creating a KLocalizedContext and registering it. 0030 0031 Information on using KI18n as a translation mechanism can be found in the 0032 [programmer's guide](@ref prg_guide) and the [translator's guide](@ref trn_guide). 0033 0034 0035 ## Locale data lookup 0036 0037 ### Introduction 0038 0039 KI18nLocaleData provides access to information about: 0040 * Countries as per ISO 3166-1, via KCountry. 0041 * Country sub-divisions as per ISO 3166-2, via KCountrySubdivision. 0042 * IANA timezones, via KTimeZone. 0043 0044 These elements can be looked up via their corresponding standardized identifiers, 0045 geo coordinate or (localized) name. 0046 0047 Besides the C++ API, a [QML API](@ref locale_data_qml_api) is also available. 0048 0049 ### Usage 0050 0051 Some of this information is read from [iso-codes](https://salsa.debian.org/iso-codes-team/iso-codes/) 0052 at runtime, so the iso-codes data files and translation catalogs need to be installed.