i18n Package » Developer.Team - Developers Paradise!

i18n Package

i18n Package


The i18n package is a library of Delphi components, classes and procedures in purpose of assisting developers to fully internationalize Delphi applications in an easy manner, and to change the locale of the applications on the fly.

There are many software tools for localizing a Delphi application, but they mostly just provide support for translation of the user interface strings. However, the i18n package not only enables developers to select translatable properties and string constants/literals within the IDE but also takes care of plural forms, reading layout, formatting preferences, and calendar system of the target language.

You want your application be ready for right-to-left languages, but you do not know which language is right-to-left and even how it works. Don’t worry, the i18n package knows how to handle right-to-left languages. When the application’s locale changes, and whenever needed, the i18n package automatically mirrors the layout of the application’s forms according to the reading layout of the selected language. You do not need to write a single line of code or even modify it.

Delphi missed to support bi-directional layout for most common controls. The i18n package workarounds this limitation and mirrors the layout of page and tab controls, tree views, list views, header controls, and status bars whenever it is needed.



Although the Gregorian calendar is most used calendar in the world, but if your application only supports this calendar, it cannot be truly localized for all countries/regions. The i18n package knows which calendar system is used by which country/region, and automatically displays and requests date-time values in the appropriate calendar. You do not need to have knowledge about different calendars, because your code still sees a standard TDateTime value. The following major calendars are implemented in the i18n package:

The Gregorian Calendar
The Hebrew or Jewish Calendar (Ч”ЧњЧ•Ч— Ч”ЧўЧ‘ЧЁЧ™)
The Hijri or Islamic Calendar (Ш§Щ„ШЄЩ‚Щ?ЩЉЩ… Ш§Щ„Щ‡Ш¬Ш±ЩЉ)
The Jalali or Persian Calendar (ЪЇШ§Щ‡ШґЩ…Ш§Ш± Ш¬Щ„Ш§Щ„ЫЊ)
The Japanese Emperor Era Calendar
The Julian Calendar
The Korean Tangun Era Calendar
The Taiwan calendar
The Thai Buddhist Calendar

The i18n comes with some components to make the locale dependent tasks easier. Here are the list of components/controls that you will have after installation of the package:

TLocalizer
Provides the core functionality for localizing an application.
TTranslator
Maintains list of translatable strings for a form, frame, data module, and so on. This component also translates the user interface strings and handles bi-directional mirroring of the controls.
TGoogleTranslator
This is an interface to the online Google translation service for automatic text translation.
TMessageDialog
Displays a localizable and customizable message dialog.
TInputQueryDialog
Displays a localizable input dialog box that lets the user enter a string, double, or integer.
TIntlDateTimeLabel
A label control that displays a fully localizable TDateTime value on a form.
TIntlMonthCalendar
A month calendar control to display a fully localizable calendar on a form.
TIntlDatePicker
A control that is designed specifically for entering localized dates.
TFlagImageList
A special image list component that provides country flag icons.
TImageLabel
A label control that can include an image on its face.
TCultureLabel
A label control to display name and country flag of a culture (locale) on a form.
TCultureBox
A combo box control that represents a list of cultures (locales).
TCultureListBox
A list box control that represents a list of cultures (locales).
TCultureCheckListBox
A check list box control that represents a list of cultures (locales).
TTerritoryLabel
A label control that displays name and flag of a country/region on a form.
TTerritoryBox
A combo box control that represents a list of countries/regions.
TTerritoryListBox
A list box control that represents a list of countries/regions.
TTerritoryCheckListBox
A check list box control that represents a list of countries/regions.
TCurrencyLabel
A label control that displays name and country flag of a currency on a form.
TCurrencyBox
A combo box control that represents a list of currencies.
TCurrencyListBox
A list box control that represents a list of currencies.
TCurrencyCheckListBox
A check list box control that represents a list of currencies.
TDBImageLabel
A data-aware label control that displays value of a field plus a custom icon on a form.
TDBCultureLabel
A data-aware label control that displays value of a locale field.
TDBCultureBox
A data-aware combo box control that enable users to select value of a locale field from a list of cultures (locales).
TDBCultureListBox
A data-aware list box control that enable users to select value of a locale field from a list of cultures (locales).
TDBTerritoryLabel
A data-aware label control that displays value of a country/region field.
TDBTerritoryBox
A data-aware combo box control that enable users to select value of a country/region field from a list of territories.
TDBTerritoryListBox
A data-aware list box control that enable users to select value of a country/region field from a list of territories.
TDBCurrencyLabel
A data-aware label control that displays value of a currency symbol field.
TDBCurrencyBox
A data-aware combo box control that enable users to select value of a currency symbol field from a list of currencies.
TDBCurrencyListBox
A data-aware list box control that enable users to select value of a currency symbol field from a list of currencies.
TDBIntlDateTimeLabel
A data-aware label control to display localized value of a date-time field.
TDBIntlDatePicker
A data-aware control that enables the user to enter a localized date for a date field.

In addition to the components and classes that are implemented just for localization purposes, the i18n package has some other classes to:

Decode/encode JSON formatted strings.
Set formatted content of rich edit controls using BBCode styled tags.
Parse and evaluate expressions in C language syntax.
Parse Pascal codes to extract string literals and string constants.




[url=http://developer.team/engine/go.php?url=aHR0cHM6Ly93d3cucGF5cGFsLmNvbS9jZ2ktYmluL3dlYnNjcj9jbWQ9X3MteGNsaWNrJmFtcDtob3N0ZWRfYnV0dG9uX2lkPTZXNUtGWkVaNU5TVDI%3D]DONATE SOMETHING TO KEEP ALIVE[/url]