Localization Design

G

Gidon

Hi,
In my application design I'm stuck on the following problem:
I have an application that will both be web as well as WPF/WCF based.
Both are essentially the same, only the platform is different. Both
share the same database and both will be totally localized to
currently 3 languages. The localization of the GUI parts of both apps
will sit in resource files, localized data such as "countries" (France
(English) vs Frankrijk (Dutch) will come from the database.
I have a data object layer (for example holding a Country object)
which is fed from the database and sent either to the web app, or via
WCF to the WPF app.
My question is, for known values such as gender (only two values) or
media type (few vales such as image, video etc), where will I do the
localization? Of course these values are saved in the database, but
maybe it should be held in the resource files of the data-object
layer. So that in my WPF app I can choose a gender, and not having to
go to the database in order to get the localized value.
What would be the best place to localize enum kind of values?
Thanks
 
N

Nicholas Paldino [.NET/C# MVP]

Gidon,

I think that for the sake of your application, you should be consistent.
You could have representations in code of values from the database, but if
you are going to display the information to the user, use the same mechanism
that you are using now (although I would place everything in resource files,
to be honest).
 
T

Tobias Schröer

Hi Gidon,

it depends on how frequently you will have to change the localized data.
Strings for genders will most likely stay the same for quite a while.
Others as media types or country name may change. However, country names
are already stored in the database, which is fine in my opinion, as long
as you have considered the effort it takes to add a new language. New
table column would be bad design ;)

To face your question: If both WPF and web app have the same localized
strings, you should provide them the the greatest common layer (data
layer, if I get you right). Database or XML file storage, if the data
changes often, satellite assemblies for fixed ones.

HTH, Tobi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top