views:

2147

answers:

6

What libraries are there to write C# internationalized applications?

Typical functionalities that should be contained in the library:

  • Validation of country specific data (e.g. VAT numbers, phone numbers, addresses,...)
  • Validation of bank and financial coordinates (e.g. Credit Card numbers, IBAN,...)
  • Language-specific functionalities (e.g. numbers to words to numbers, summarize,...)
  • Language specific content filtering (e.g. swearword filtering...)

An example of such libraries in Perl would be the Internationalization/Locale section of CPAN.

What C# solutions are available?


Note: I am not looking for an introduction to the System.Globalization namespace :)


Note 2: Should I desume that there are no options available? Is someone interested in joining forces and create one?


Note 3: Edit to make the question appear on front page in hope of more answers. This isn't such a hard question, how is it possible that Stackers don't ever do i18n?

+1  A: 

Have a look at http://www.microsoft.com/globaldev/getwr/dotneti18n.mspx
and http://www.dotneti18n.com/

Rik
I know System.Globalization quite well already. My question was different though. Thanks anyways.
Sklivvz
A: 

String to number and vice versa can be dones as following:

   culture = new CultureInfo(locale);
   int number = Convert.ToInt32(myString, culture.NumberFormat);
   string str= Convert.ToString(myNumber, culture.NumberFormat);

As to checking VATS and adresses, I'm interested in that too, haven't found anything useful so far.

Carra
+2  A: 

First library found: NUtility (MIT License)

NUtility currently has classes which provide a database abstraction layer, command line processing and validation and conversion functionality, which includes: commandline processing; credit card validation; email address validation; IP address validation; UK postcode validation; Soundex, extended Soundex and metaphone encoding; ROT13 encoding; phonetic-alphabet encoding; and metric-imperial conversions.

Sklivvz
+1  A: 

I wouldn't say that no one does i18n, but I don't know of any generic tools that can be used for every project. Maintaining a database with all of the information you are looking for would be an epic project. It sounds like what you're looking for isn't a specific C# library, but more a collection of information online that you can draw from. If you were able to find a repository of swear words in various languages (for example), it would be trivial for you to use this in C#. I think that finding a solution that wraps up all of your requirements into an easy-to-use assembly is going to be impossible to find.

Jon Tackabury
Example of things I would expect to see in the library: validation of phone numbers, address format, zip code, SSN (or equivalent), bank account numbers; name formatting; holidays calendar; a currency class; country specific classes, for example in UK you can derive an address from a postcode; etcetera...
Sklivvz
+4  A: 

One project that is working towards a database of globalization, internationalization and localization knowledge is the Unicode Common Locale Data Repository, based on the old ICU project at IBM.

As it is a database of XML data it doesn't contain any .NET-specific code, but as a body of knowledge it is very good.

Only a smallish subset is in the .NET framework. Microsoft hasn't gone near any of the supplemental stuff, like postcode formats, number spelling (for check/cheque amounts), etc. Standard time zone names (from the Olson/tz distribution), etc. are also included, with mappings to the Windows-specific names. Some of the hierarchical locale-specific behaviours also have better support.

devstuff
Not only it is not a library, but most stuff is already in the .net stack.
Sklivvz
Added more info.
devstuff
A: 

Not exactly a "library", per se, but I've actually ran into a great service (for pay), by a company called E4X (former client of mine).
What they provide is complete localization of your ecommerce site, including language translations, currency exchanges, local billing and handling of financial transactions including region-specific taxes etc, and more. They even deal with logisitics of physical shipping...

Worth looking into, for an ecommerce business. Let 'em know I sent you... ;-)

AviD