Windows - Currency Settings
-
Hello guys, I have a problem where I am developing financial software and when it comes to displaying the ammounts I want the application to take the culture information from the OS and apply the currency accordingly. Bu t my problem is when I go to regional setting in control pannel and change the currency symbol for Maltese language to EUR from LM and press apply everything works ok but what i need isn to set the symbol of the maltese language to EUR but still use the English lanaguage as my current lanaguage but when i do this the maltese currency symbol reverts back to LM. Is there any way i can save the default currency symbol? Thank you guys in advance Regards, Christian Pace
-
Hello guys, I have a problem where I am developing financial software and when it comes to displaying the ammounts I want the application to take the culture information from the OS and apply the currency accordingly. Bu t my problem is when I go to regional setting in control pannel and change the currency symbol for Maltese language to EUR from LM and press apply everything works ok but what i need isn to set the symbol of the maltese language to EUR but still use the English lanaguage as my current lanaguage but when i do this the maltese currency symbol reverts back to LM. Is there any way i can save the default currency symbol? Thank you guys in advance Regards, Christian Pace
-
Hello guys, I have a problem where I am developing financial software and when it comes to displaying the ammounts I want the application to take the culture information from the OS and apply the currency accordingly. Bu t my problem is when I go to regional setting in control pannel and change the currency symbol for Maltese language to EUR from LM and press apply everything works ok but what i need isn to set the symbol of the maltese language to EUR but still use the English lanaguage as my current lanaguage but when i do this the maltese currency symbol reverts back to LM. Is there any way i can save the default currency symbol? Thank you guys in advance Regards, Christian Pace
Hi Christian, Why don't you just format the currency independently? In the C++ language I would use the GetCurrencyFormat Function[^] to format the currency as follows:
CURRENCYFMT fmt = {0}; TCHAR szFormatted[MAX_PATH] = {0}; LCID lc = MAKELCID(MAKELANGID(LANG_MALTESE,SUBLANG_MALTESE_MALTA),SORT_DEFAULT); GetCurrencyFormat(lc,0,_T("123456.00"),NULL,szFormatted,ARRAYSIZE(szFormatted));
However if you are developing with the .NET languages I believe that you can use the System.Globalization Namespace[^] which has a NumberFormatInfo Class[^]. Here is a Microsoft Developer Center article which you may find useful: Globalization Step-by-Step[^] Best Wishes, -David Delaune -
Hi Christian, Why don't you just format the currency independently? In the C++ language I would use the GetCurrencyFormat Function[^] to format the currency as follows:
CURRENCYFMT fmt = {0}; TCHAR szFormatted[MAX_PATH] = {0}; LCID lc = MAKELCID(MAKELANGID(LANG_MALTESE,SUBLANG_MALTESE_MALTA),SORT_DEFAULT); GetCurrencyFormat(lc,0,_T("123456.00"),NULL,szFormatted,ARRAYSIZE(szFormatted));
However if you are developing with the .NET languages I believe that you can use the System.Globalization Namespace[^] which has a NumberFormatInfo Class[^]. Here is a Microsoft Developer Center article which you may find useful: Globalization Step-by-Step[^] Best Wishes, -David Delaune