EasyTable: Single-File Embedded Database,
a BDE replacement for Delphi and C++Builder

Internationalization and localization
Previous  Top 


This topic discusses guidelines for writing applications you plan to distribute to an international market. By means of the ahead planning, you may reduce the amount of code and time necessary to make your application operate in its foreign market as well, as it does in its domestic market.

Some things you should know for writing international applications with EasyTable.

Currency, float numbers and date/time format

Sometimes you have to convert Currency, Date/Time or float value to string. For example if you need to set Filter property of EasyTable for condition like 'Birthday=01/01/1970'.
EasyTable always uses current values of DateSeparator, TimeSeparator and DecimalSeparator.
So you should use DateToStr/TimeToStr or FloatToStr functions to get converted date/time or float value.

Locale and strings sort order

You may use the IndexName and IndexFieldNames properties to set the current index order, and consequently, sort the current table based upon the index definition for the selected index order.
However sorting order for strings depends on current system/user locale and it is specific for various languages.
EasyTable uses locale specific string operations, so if you use ftString data type then all records being sorted by this field will be sorted using current system locale.
If you want to support Asian languages you should use Unicode character set.

Unicode support

In the Unicode character set, each character is represented by two bytes. Thus a Unicode string is a sequence of two-byte words, not individual bytes. Unicode characters and strings are also called wide characters and wide character strings. The first 256 Unicode characters map to the ANSI character set.
EasyTable implements Unicode support through the ftWideString data type.

The following example shows how to set and get data of Unicode field.

var ws: WideString;
with MyEasyTable do
get data from Unicode field
ws := FieldByName('Unicode').Value;
do something with data in ws
ws := 'example string';
set data to Unicode field
FieldByName('Unicode').Value := ws;

© AidAim Software EasyTable: Easytable Single-file Embedded Database Bde Replacement Delphi C\+\+builde