Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Database application

1 view
Skip to first unread message

Alan

unread,
Sep 29, 2006, 2:19:42 AM9/29/06
to

Hi All,
We have a database program currently working only for English language. We use mysql as our database.

Now we have a new requirement to facilitate for other languages. I have few queries,
How can we store data in the database in another language?
Can we use only English as database language and only change the language in user interface according to user requirement?

Any information appreciated.

Thanks.

Alan

Bernhard Geyer

unread,
Sep 29, 2006, 2:59:17 AM9/29/06
to
Alan schrieb:

MySQL support from Version 4.1 Unicode in the Database. You can store the chars as UTF8 or UCS2.
And MyDAC (http://crlab.com/mydac/) supports this.

Also you should use Unicode-Enabled Controls like ElPack (http://www.lmdinnovative.com/products/lmdelpack/)
or TNTWare. Don't use Codepage/Charset. You will run into too many problems.

Alan

unread,
Sep 29, 2006, 6:54:56 AM9/29/06
to

Thanks Bernhard for information.

Is it possible to change the user interface language to another specified language at application start up time without doing any modification to database (that means data store only in one language)?


Thanks.

Bernhard Geyer

unread,
Sep 29, 2006, 3:23:56 PM9/29/06
to
> Is it possible to change the user interface language to another specified language at application start up time without doing any modification to database (that means data store only in one language)?

I don't know exactly what you want, but look at
http://dybdahl.dk/dxgettext/ if you want multi-language support in your
app and support of changing language at runtime.

Bernhard

Igor Siticov

unread,
Sep 30, 2006, 12:51:01 AM9/30/06
to
Hi,

You can take a look at TsiLang Components Suite from http://www.tsilang.com
It will allow you to switch user language without DB modifications and much
more.

--
Best regards.
TsiLang Components Suite - Best Globalization Tool 2004
http://www.tsilang.com

"Alan" <alpr...@hotmail.com> wrote in message
news:451cbafe$1...@newsgroups.borland.com...

Jaska at

unread,
Oct 3, 2006, 10:17:16 AM10/3/06
to
Hi,

Does your database contain string that need to be translated. For example if
you have a product database it might contains a description or how to use
field that contains strings.
In that case you have to make the database multilingual. This means that you
have to modify the data such way that it can contain data in several
languages. There are several way to do that.

The following data is fom Sisulizer (www.sisulizer.com) online help

The basic idea is that you modify the table sturcture and then you extract
the original strings and finally put translated string back to the tabes.
Sisulizer automates this process and translates user interface as well.

Database Localization
There are four methods to localize databases. The methods are:

Row localization
Field localization
Table localization
Database cloning
Each method has it advantages and disadvantages. You must choose the method
that best suits your needs. No matter what method you use Sisulizer does
never not change the table structure. It only updates the values in the
localized fields, tables or rows, or creates and updates the localized
database copies. You have to modify the database structure to prepare it for
localization.

Compering different localization methods
The following table compares different localization methods.

Feature Row Field Table Cloning
Works with any database yes yes yes -
Can be localized without changing the database structure - - - yes
New languages can be added without changing the database structure yes - -
yes

Row localization
In this method Sisulizer copies the original row for each language. The
copied rows equal to the original one except the Language field value is
different (matches the language of the row) and those fields that have been
marked to be localized contain localized value.

To use row localization:

Prepare table structure for localization
Add language field to those database tables that you want to localize. This
requires you to change the table structure. Make sure that the language
field is part of primary key.

For example you have the following table structure:

CREATE TABLE Country
(
Id INTEGER NOT NULL,
Name VARCHAR(50) NOT NULL,
Population INTEGER NOT NULL,
PRIMARY KEY(Id)
);
IIf you want to localize the above table add the Language field and add that
to the primary index.

CREATE TABLE Country
(
Id INTEGER NOT NULL,
Language VARCHAR(10) NOT NULL,
Name VARCHAR(50) NOT NULL,
Population INTEGER NOT NULL,
PRIMARY KEY(Id, Language)
);
Now the database is ready for localization.

Add database to the project
Use Project Wizard to create a Sisulizer project containing the database.
Remember to check Use localized items check box in the Database sheet. If
you use the standard field name convention for language field Sisulizer will
automatically detect the field to be a language field. The standard language
field name is either "language", "languageid", "langid", "locale" or
"localeid". If you do not use the standard language field name convention
you must mark the field to be a language field by right clicking and
checking the Language menu. Check those fields that you want to localize.

Sample table
If the original Country table looks like this,

Id Name Population
0 United States 297
1 Germany 82
2 Japan 127

The localized Country table will look like this after Sisulizer has updated
the localized field values:

Id Language Name Population
0 en United States 297
0 de Vereinigte Staaten 297
0 ja ??????? 297
1 en Germany 82
1 de Deutschland 82
1 ja ??? 82
2 en Japan 127
2 de Japan 127
2 ja ?? 127

Field localization
In this method Sisulizer updates the values of the localized fields. The
localized fields are equal to the original field except they contain data in
different language. For example if the original language is English and you
want to localize the database to German and Japanese you add German and
Japanese fields for those fields that contain strings to be localized.

Prepare table structure for localization
Add localized fields to those databases that you want to localize. This
requires you to change the table structure.

IIf you want to localize the Country table to German and Japanese add
localized Name, Capital and Description fields for each language.

CREATE TABLE Country
(
Id INTEGER NOT NULL,
Name VARCHAR(50) NOT NULL,
Name_de VARCHAR(50) NOT NULL,
Name_ja VARCHAR(50) NOT NULL,
Population INTEGER NOT NULL,
PRIMARY KEY(Id)
);
Now the database has placeholders for German and Japanese localization.
Unlike in row localization you have to change the table structure every time
you add a new language.

Add database to the project
Use Project Wizard to create a Sisulizer project containing the database.
Remember to check Use localized items check box in the Database sheet. If
you use the standard field name convention for localized fields Sisulizer
will automatically detect the fields to be localized ones. The standard
localized field name is a combination of the original field name and the
language code (e.g. German field name of Description field would be
Description_de or DescriptionDe). If you do not use the standard localized
field name convention you must drag localized fields as a child fields of
the original fields and set the language of the field by right clicking and
choosing the language from the Languages menu.

Sample table
The localized Country table will look like this after Sisulizer has updated
the localized field values:

Id Name Name_de Name_ja Population
0 United States Vereinigte Staaten ??????? 297
1 Germany Deutschland ??? 82
2 Japan Japan ?? 127

Table localization
In this method Sisulizer adds new language tables for each table.

Prepare table structure for localization
Add localized tables for those tables that you want to localize. The
localized tables only contains the primary key and those fields that will be
localized.

IIf you want to localize the table to German and Japanese add localized
Name, Capital and Description fields for each language.

CREATE TABLE Country_de
(
Id INTEGER NOT NULL,
Name VARCHAR(50) NOT NULL,
PRIMARY KEY(Id)
);

CREATE TABLE Country_ja
(
Id INTEGER NOT NULL,
Name VARCHAR(50) NOT NULL,
PRIMARY KEY(Id)
);
Now the database has placeholders for German and Japanese localization.
Unlike in row localization you have to change the table structure every time
you add a new language.

Add database to the project
Use Project Wizard to create a Sisulizer project containing the database.
Remember to check Use localized items check box in the Database sheet. If
you use the standard table name convention for localized tables Sisulizer
will automatically detect the tables to be localized ones. The standard
localized table name is a combination of the original table name and the
language code (e.g. German table name of Description table would be
Description_de or DescriptionDe). If you do not use the standard localized
table name convention you must drag localized table as a child table of the
original table and set the language of the table by right clicking and
choosing the language from the Languages menu.

Sample table
The localized German Country table will look like this after Sisulizer has
updated the localized field values:

Id Name
0 Vereinigte Staaten
1 Deutschland
2 Japan

The localized Japanese Country table will look like this after Sisulizer has
updated the localized field values:

Id Name
0 ???????
1 ???
2 ??

Database cloning
In this method Sisulizer creates a copy of database for each language. This
method is the only localization method that does not require changing of the
table structure. Database cloning is available only for those databases that
use single database file such as Access and Interbase.

Add database to the project
Use Project Wizard to create a Sisulizer project containing the database.
Remember to check Clone original database check box in the Database sheet.
Check those fields that you want to localize.

Sample table

The Country table in the German database will look like this after Sisulizer
has created the database:

Id Name Population
0 Vereinigte Staaten 297
1 Deutschland 82
2 Japan 127

The Country table in the Japanese database will look like this after
Sisulizer has created the database:

Id Name Population
0 ??????? 297
1 ??? 82
2 ?? 127


0 new messages