How to get the EURO currency symbol for Slovenia and Slovakia into SharePoint


Updated 31/Oct/2008

Since 1 January 2007 Slovenia has the EURO as the official currency. With the 1 January 2009 the next European community member will get the EURO as the official currency.

With Windows 2008 it works for Slovenia already but you will see in SharePoint still the SIT as the currency symbol. SharePoint based on .NET FrameWork 2.0 and is using the CultureInfo classes to determine the Culture information in relation to the countries. .NET access Windows API's to get the information.

It means the change should be made within the Windows operating system but a global change might have also other side effects because not all machines worldwide are updated just in time.

With the .NET FrameWork we are very flexible and therefore we can help by ourselves.

The result should look: clip_image002 Screenshot when you chose the field type currency for a list column.

The following code snipped you can put into your C# Visual Studio 2005 or 2008 project and compile a command-line or Windows forms tool. You need to run the tool on each SharePoint Server! After the tool created a new custom locale you need to reboot the machine(s). Please be also aware that all .NET applications running on those "patched" machines are using the new custom locale for the given culture.

 

This way to overwrite an existing Culture is a supported way since our August 2008 Cumulative Update.

The sentence: An option was added to let users select an alternative representation of the currency symbol of a list.

tells you the full support of this functionality. See http://support.microsoft.com/kb/956057

The following sample code should give you an idea how to do this but is not fully tested by me and please use it carefully and on your own risk.

For Slovakia you may need to change the culture information to sk-sk.

 

using System;
using System.Globalization;

namespace ModifyCurrencySymbol

public static void Main()

{
    CultureAndRegionInfoBuilder cib = null;

    try
    {

// Create a CultureAndRegionInfoBuilder object 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 named "x-en-US-sample".
            Console.WriteLine("Unregister the change we made for Slovenia CultureAndRegionInfoBuilder...\n");
            System.Globalization.CultureAndRegionInfoBuilder.Unregister("sl-si");
    }
    }
}

 

References:

Slovenia coins: http://www.ecb.eu/bc/euro/coins/html/sl.en.html

Slovakia coins: http://www.ecb.eu/bc/euro/coins/html/sk.en.html

CultureAndRegionInfoBuilder Constructor
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

928365    Description of the security update for the .NET Framework 2.0 for Windows Server 2003, Windows XP, and Windows 2000: July 10, 2007
http://support.microsoft.com/default.aspx?scid=kb;EN-US;928365

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"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;939949

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)"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;949080

Skip to main content