Currency formatting Options
nathanp812
Posted: Wednesday, September 12, 2007 4:37:24 PM
Rank: Newbie

Joined: 9/12/2007
Posts: 8
Hi,

I have a problem that I hope is simple to sort out.

I have created a .NET usercontrol that implements umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor interface and added it as a datatype to Umbraco using the usercontrol wrapper.

Everything works great when browsing the control, except the formatting of the currency symbols in the control. When I run the control in Umbraco the currency is formatted as the 'pound' symbol (English), yet I need the currency symbol to be '$' (Australia). Yet everything is fine when I run the same control in any web app outside of Umbraco.

Do I need to add a localized language pack for en-AU (Australia)?

Any advice would be greatly appreciated.

Thanks
tim
Posted: Wednesday, September 12, 2007 5:02:50 PM

Rank: Addict

Joined: 2/19/2007
Posts: 825
Location: Belgium
Try setting the language of your site to the correct one.

Settings / languages / add your language (english australia )


And in the content section / manage hostnames and select the correct language


Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
tim
Posted: Wednesday, September 12, 2007 5:03:59 PM

Rank: Addict

Joined: 2/19/2007
Posts: 825
Location: Belgium
Or if your site is only in 1 language, delete the default language and add your own

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
sparrez
Posted: Wednesday, September 12, 2007 5:04:38 PM
Rank: Devotee

Joined: 5/17/2007
Posts: 53
You could have a look at http://msdn2.microsoft.com/en-us/library/hy4kkhe0.aspx and the system.web/globalization element in the Web.config file. Maybe that will solve your problems.

--
Christian
nathanp812
Posted: Thursday, September 13, 2007 3:04:47 AM
Rank: Newbie

Joined: 9/12/2007
Posts: 8
Thanks for the replies, unfortunately the suggestions that have been made do not seem to change formatting of the currency within Umbraco.

I have tried Tim's suggestion about adding a language under settings>languages called English (Australia) but I have never needed to use the host name setting before (I am new to Umbraco) but it seemed pretty straight forward, just enter the hostname and select the language, English (Australia)....But it didnt work. :no:

Would this hostname scenario work if I am working on my local PC with the domain setup as a localhost address?

I have also tried Chistian's suggestion and read up on the <globalization> features of .NET just to see whether I was missing something...Below is what I have in the Umbraco web.config:


Code:
  <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-AU" uiCulture="en-AU" />
 


From everything I have read the above line should tell Umbraco that it is working in English (Australia) and therefore change the currency symbol, but it doesnt! :no:

Surely there are other users out there who have encountered this issue?

Thanks in advance
nathanp812
Posted: Monday, September 17, 2007 7:59:36 AM
Rank: Newbie

Joined: 9/12/2007
Posts: 8
Still no luck with resolving this issue...My workaround will have to be to simply remove all currency formatting and replace with decimal formatting, then at least I can get rid of the pound symbol within Umbraco.

If anyone else has any ideas or have encountered this issue themselves I am still keen to hear what the resolution was.

Thanks
pph
Posted: Monday, September 17, 2007 4:33:00 PM
Rank: Aficionado

Joined: 7/19/2006
Posts: 171
Location: aalleren, Denmark
Hi Nathan

To clear up some confusion.

The problem Nathan are having is with a usercontrol inside of the umbraco admin, not on a regular website running on top of umbraco - so hostname management is not the solution to this.

To solve your problem Nathan go to: "/umbraco/config/lang/en.xml" - this is the language file for the umbraco admin UI. In this xml file you can set the culture (on the top node) for the admin UI only.

so:
for usercontrols in the umbraco admin UI you have to change the xml files under /umbraco/config/lang.

And for usercontrols in a website created with umbraco you would use the languages under settings and the regular hostname mangement.

/Per

Umbracian Personal blog: Objects.dk
nathanp812
Posted: Tuesday, September 18, 2007 2:54:58 AM
Rank: Newbie

Joined: 9/12/2007
Posts: 8
Hi Per,

Thankyou so much for your advice. I had actually looked at the umbraco/config/lang/en.xml file when I was first trying to resolve this issue however because I am still learning Umbraco I was a little hesitant to change the top node in the en.xml file as I thought I might break something.

So following your advice I changed the top node in the umbraco/config/lang/en.xml file to:

Code:
<language alias="en" intName="English (Australia)" localName="English" lcid="" culture="en-AU">


This fixed the problem straight away. :!: It was a very painless solution but I could find no documentation on localization that pointed to altering this file.

So thanks again for your advice, it is much appreciated.
anandsd
Posted: Monday, October 22, 2007 8:15:24 AM
Rank: Enthusiast

Joined: 2/14/2007
Posts: 12
Thanks Per
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.