Giter VIP home page Giter VIP logo

ki18n's Introduction

KI18n

There's two libraries provided, KI18n for Gettext-based text internationalization, and KI18nLocaleData for access to data about countries and timezones.

KDE Gettext-based UI text internationalization

Introduction

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.

Usage

If you are using CMake, you need to have

find_package(KF6I18n NO_MODULE)
ki18n_install(po)

(or similar) in your CMakeLists.txt file, and you need to link to KF6::I18n.

When using QML, the QML Engine has to be setup for using i18n methods, which is done by creating a KLocalizedContext and registering it.

Information on using KI18n as a translation mechanism can be found in the [programmer's guide](@ref prg_guide) and the [translator's guide](@ref trn_guide).

Locale data lookup

Introduction

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](@ref locale_data_qml_api) is also available.

Usage

Some of this information is read from iso-codes at runtime, so the iso-codes data files and translation catalogs need to be installed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.