Extending .NET G11n and L10n

  • Thread starter Thread starter bullines
  • Start date Start date
B

bullines

Greetings!

I'm interested in extending what's available in the .NET framework
with regards to globalization and localization. I've read many
articles that discuss extending so that a datasource other than RESX
files (Ex: database) can be used, such as this one:

http://msdn2.microsoft.com/en-us/library/aa905797.asp

Most of these articles use the same idea of key-value pairs - just a
different datasource. I was wondering if anyone could provide some
insight as to whether it's possible to extend what .NET offers such
that content can come from, say, XML files. And not in the key-value
sense, but more along the lines of XPath or XQuery? If this is
possible, where might there be some good resources targeting .NET 3.5
to help get started? Thanks in advance.
 
Hi,

Actually RESX files are XML files anyway. If you wanted to, you could get
that info into your own XML format and read it out using XPath etc, but you'd
have to write a fair bit of redundant code.

The basic premise of RESX's / key-value pairs is that the key is like the
placeholder on your page (eg: hello_label) with the value in each data
source/resx being the implementation of that key (eg: "hello", "ni hao") etc.
It's because of the simplicity of this structure that you don't have to spend
time defining your own XML structure.

For more info on localization, you can have a look at this post on my blog:
http://geekswithblogs.net/dotNETPlayground/archive/2007/11/09/116726.aspx

best regards,
Andrew
 
the most common way of localization with xml is via xslt transformations. see
the Xml control.

-- bruce (sqlwork.com)
 
Back
Top