Sami language and System.Globalization.CultureInfo

  • Thread starter Thread starter peuramaki
  • Start date Start date
P

peuramaki

Hello all,

a client of mine requires their web site to work with sami language,
which is spoken throughout northern parts of scandinavia. I'm trying
to set up the culture with ISO 639-1 compliant abbreviation se-FI
which works just fine in my development environment. Nevertheless, in
production environment I get error

Culture name 'se-fi' is not supported.
Parameter name: name

which I have tracked down to row 3 in the code snippet below, the
CultureInfo constructor throws an exception.

1 private static void SetCulture(string cultureName)
2 {
3 CultureInfo culture = new CultureInfo(cultureName);
4 SetCulture(culture);
5 }

6 private static void SetCulture(CultureInfo culture)
7 {
8 //Set the new culture
9 System.Threading.Thread.CurrentThread.CurrentCulture = culture;
10 System.Threading.Thread.CurrentThread.CurrentUICulture =
culture;
11 }

Development and production environments should be identical but
obviously they are not. Any help?

TIA,

Panu
 
a client of mine requires their web site to work with sami language,
which is spoken throughout northern parts of scandinavia. I'm trying
to set up the culture with ISO 639-1 compliant abbreviation se-FI
which works just fine in my development environment. Nevertheless, in
production environment I get error

Culture name 'se-fi' is not supported. ....
Development and production environments should be identical but
obviously they are not. Any help?

Sami support was added in Windows XP SP2:
http://support.microsoft.com/kb/883262

Take a look at Culture Explorer:
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=B778
FF2C-9142-4769-839A-094F51A6F9F4

If you check the "Windows-Only Cultures" checkbox (bottom-left),
you will see that Sami are listed there as se-SE, sma-NO, sma-SE, smj-NO,
smj-SE, smn-FI, sms-FI

This matches ISO 639-2
http://www.loc.gov/standards/iso639-2/php/code_list.php

Windows-only Cultures are accessible in .NET starting with .NET 2.0:
http://msdn.microsoft.com/msdnmag/issues/06/06/CLRInsideOut/#S2

So, my guess on what can be wrong: no XP SP2 or no .NET 2.0
If it is working on your development machine, then I guess it is .NET 2.0 and
the XP SP2 is what's missing.

Culture Explorer can be a nice debugging tool in this case :-)
 
Thank you for your help, Mihai and Robin.

Case sensitivity is not the problem here. I ran Culture explorer and
found out that Sami culture se-FI is not available on the production
server. A minor detail (which you probably guessed already) is that my
production server runs on Win2003 server, whereas my development
environment runs WinXP..

So, obviously all this boils down to the fact that Windows 2003 server
doesn't support Sami. Any ideas for work-around then?

TIA,

:^Panu>
 
Actually, never mind the previous message. The Sami language is
supported in Win2003 SP2 as well. Problem solved. Thanks for help once
again!

:^Panu>
 
Back
Top