Microsoft Knowledge Base Email Alertz

How to programmatically change the currency symbol for Slovenia and Slovakia to the euro in Windows SharePoint Services and in Office SharePoint Server

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 960287 - Last Review: May 14, 2009 - Revision: 1.0

How to programmatically change the currency symbol for Slovenia and Slovakia to the euro in Windows SharePoint Services and in Office SharePoint Server

INTRODUCTION

On January 1, 2007, the euro became the official currency of Slovenia. On January 1, 2009, Slovakia became the next European community member to adopt the euro as its official currency.

Windows Server 2008 already shows the euro as Slovenia's currency, but in Windows SharePoint Services 3.0 and in Microsoft Office SharePoint Server 2007, the Slovenian tolar (SIT) is still shown as the currency symbol for Slovenia. SharePoint is based on the .NET Framework 2.0, and it uses the CultureInfo class to determine the culture information for the world's countries. The .NET Framework accesses Windows APIs to obtain this information.

This same change should be made across the other Windows operating systems (in addition to Windows Server 2008). However, making this change across all computers in a global organization could have unexpected side effects, because not all the computers will necessarily be updated at the same time.

MORE INFORMATION

The flexibility of the .NET Framework lets administrators change the currency symbol for Slovenia and for Slovakia to the euro symbol in SharePoint.

When you select the field type currency for a list column, the result will appear as follows:
Currency format:
123 456,00 € (Slovenia)
You can insert the following sample code into a Microsoft Visual C#, Microsoft Visual Studio 2005, or Visual Studio 2008 project and then compile a command-line tool or a Windows forms tool. You must run this tool on each SharePoint server. After the tool creates a new custom locale, you must restart the servers.

Notes
  • After you do this, all .NET Framework applications that run on these "patched" servers now use the new custom locale for the culture in question.
  • This method of overwriting an existing culture is supported since the release of the August 2008 Cumulative Update (KB 956057). For more information, click the following article number to view the article in the Microsoft Knowledge Base:
    956057  (http://kbalertz.com/Feedback.aspx?kbNumber=956057/ ) Description of the Windows SharePoint Services 3.0 hotfix package (Sts.msp): August 26, 2008
Warning The following sample code should give you an idea of how to create this tool, but this code is not fully tested by Microsoft. Use it at your own risk.
using System; 
using System.Globalization; 
namespace ModifyCurrencySymbol 
public static void Main() 
{ 
    CultureAndRegionInfoBuilder cib = null; 
    try 
    { 
// Create a CultureAndRegionInfoBuilder object that is named "sl-si". 
    Console.WriteLine("Change currency for Slovenia by CultureAndRegionInfoBuilder...\n"); 
    cib = new CultureAndRegionInfoBuilder(  
                         "sl-si", CultureAndRegionModifiers.Replacement);  
// Populate the new CultureAndRegionInfoBuilder object with culture information. 
    CultureInfo ci = new CultureInfo("sl-si"); 
    cib.LoadDataFromCultureInfo(ci); 
// Populate the new CultureAndRegionInfoBuilder object with region information. 
    RegionInfo  ri = new RegionInfo("sl-si"); 
    cib.LoadDataFromRegionInfo(ri); 
// Change the needed properties. 
    cib.ISOCurrencySymbol = "EUR"; 
    cib.NumberFormat.CurrencySymbol = "€"; 
// Register the custom culture. 
    cib.Register(); 
    Console.WriteLine("\nNote:\n" + 
        "Use the example in the Unregister method topic to remove the custom culture."); 
    } 
    catch (Exception MyCatchException) 
    { 
        Console.WriteLine(MyCatchException);  
    } 
    } 
private void Unregister_Custom_Culture() 
    { 
// Unregister a CultureAndRegionInfoBuilder object that is named "x-en-US-sample". 
            Console.WriteLine("Unregister the change we made for Slovenia CultureAndRegionInfoBuilder...\n"); 
            System.Globalization.CultureAndRegionInfoBuilder.Unregister("sl-si"); 
    } 
    } 
}
Note To create this tool for a Slovakian currency environment, you must change the culture information to sk-sk.

REFERENCES

CultureAndRegionInfoBuilder Constructor
http://msdn.microsoft.com/en-us/library/system.globalization.cultureandregioninfobuilder.cultureandregioninfobuilder(VS.80).aspx (http://msdn.microsoft.com/en-us/library/system.globalization.cultureandregioninfobuilder.cultureandregioninfobuilder(VS.80).aspx)
How to create custom cultures
http://msdn.microsoft.com/en-us/library/ms172469.aspx (http://msdn.microsoft.com/en-us/library/ms172469.aspx)
928365  (http://kbalertz.com/Feedback.aspx?kbNumber=928365/ ) Description of the security update for the .NET Framework 2.0 for Windows Server 2003, Windows XP, and Windows 2000: July 10, 2007
939949  (http://kbalertz.com/Feedback.aspx?kbNumber=939949/ ) Error message when you run an application or try to access a Web site on a computer that has a particular .NET Framework 2.0 software update installed: "Culture name 'Culture' is not supported"
949080  (http://kbalertz.com/Feedback.aspx?kbNumber=949080/ ) Error message when you execute a CLR routine or use an assembly in SQL Server 2005: "Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)"

APPLIES TO
  • Microsoft Windows SharePoint Services 3.0
  • Microsoft Office SharePoint Server 2007
Keywords: 
kbhowto kbsurveynew kbinfo KB960287
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate