Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / October 2007

Tip: Looking for answers? Try searching our database.

Database localization

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jon - 03 Oct 2007 20:01 GMT
I understand how to localize forms when all the strings are in the res file,
but what about when some strings are in a database. For instance, say you
have a datagrid that pulls the column names from a table (like below).

tableGrid
ColumnName varchar
ColumnDisplayText  varchar
ColumnFormat varchar
Visible bit
Editable bit

The column ColumnDisplayText is what the user sees the grid column as. So,
when the user loads up that form, it reads in the data and creates the grid
on the fly. Great when there is only one laguage, but what is the best way
to do it when there is more than one language running off the same database?
Do you have to create ColumnDisplayText_en-US, ColumnDisplayText_fr-FR, etc,
etc? Is there a better way (I hope!)?

Thanks
Jon
Jaakko Salmenius - 04 Oct 2007 01:08 GMT
There are several ways to localize databases. Sisulizer localization tool
support five different ways. They are

1) Field localization. You add language specific fields to table. It is easy
but you have to modify the table when you add new language
2) Database cloning. Sisulizer makes a copy of database and replaces the
values of the selected fields with translations
3) Table localization. You add language specific table that contains
translations of the original tables. This is not that practical but can be
used in some place

4) Row localization. Here you add language field as a part of primaty key.
This is the best localization method for DB.
Let has an example

I have table: (Id, Name, Description) and I want to localize Description. I
modify the table to (Id, Language, Name, Description). Id;Language is the
the primary key. So table can contains the same Id many time but with
different language id.

If I have table
0    Finland    Country of thousands lakes
1    Japan    Country of beautifull girls

After I add language field and localize to Finnish I will get
0    en    Finland    Country of thousands lakes
0    fi    Suomi    Tuhansien järvien maa
1    en    Japan    Country of beautifull girls
1    fi    Japani    Kauniiden naisten maa

You can add the localized rows and fill them up manually but using Sisulizer
will make this so much easier and safer. You can download it with samples
databases and documentation about database localization from
http://www.sisulizer.com/downloads.shtml

5) As above but Language id is not part of primary id. Primary id is autoinc
and in addition of that there is resource id that gives unique id for the
row. Use this if your primary key must contains only one field.

Best regards,
Jaakko
Jaakko Salmenius - 04 Oct 2007 01:13 GMT
More information
http://www.sisulizer.com/localization/software/server-desktop-database.shtml
bryan - 19 Oct 2007 14:20 GMT
Jaakko discusses the basic solutions for localizing information that is
retreived from the database.   What often trips people up is the effect of
the localization upon the operation of the database (sorting, etc.)

One really tricky bit is if the information to be stored is in a language
such as Kanji wherein items are sorted by how they are pronounced, but each
glyph is pronounced differently based on the glyphs around it (which, as far
as I know, no database is capable of sorting).   Some solutions for the
problem use a second column of information which IS sortable by the database
and is entered and maintained separately from the "unsortable" strings.

>I understand how to localize forms when all the strings are in the res
>file, but what about when some strings are in a database. For instance, say
[quoted text clipped - 16 lines]
> Thanks
> Jon

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.