all my dates (using myDate.ToShortDateString()) are coming out mm/dd/yyyy (american style) and anywhere i'm formatting a decimal (using myDecimal.ToString("C")) it's coming out with a $ sign.
am i missing somit?! is there a culture setting in umbraco that's overriding the web.config setting?!
i'd stumbled upon the stackoverflow post you mentioned in my googling and tried the suggestion. for a multilingual site, i think this'd work fine however the local set by the browser influences the output and the site i'm working on is uk facing (and the sales and only in gbp).
i've just set up a blank mvc project on my machine to test out if the globalization will work 'out of the box' as it were.
amazing! it worked! far out, that completely threw me ;)
learnt something new about umbraco today - too good.
can feel a blog post coming on...
thank you to everyone who posted a reply on this post, you've saved me the hair on my head ;)
p.s. as a follow up question, i wonder why my install only had 'en-US' in it? i'm based in the uk but using a peecee that is set up for australia. at work (all uk based systems) i've never had to set this up so i'm wondering if it's got somit to do with my home system...
The reason is simply that Umbraco is only setup with the en-US culture by default - If you need another culture you need to add it manually. It is like this no matter the culture on your PC etc.
did a bit more playing with this and found that the 'inherit' settings appears to mean 'inheritthe culture from my ancestors'.
so in the example site i have, the root node is now set to 'en-GB'. i can have a node several child levels down and by default it'll inherit the root nodes culture. however, if i change the child node culture to 'en-US' it'll change the culture for just that node.
Ah yes makes sense actually - Just never used it in any scenarios myself but it's a nice option indeed. Can quickly think of scenarios where it's relevant. I learned something new as well now :) Thanks for sharing.
web.config globalization for uk ignored?!
it maybe cos it's late... it maybe cos i'm tired...
i've got this in my web.config in the 'system.web' section:
all my dates (using myDate.ToShortDateString()) are coming out mm/dd/yyyy (american style) and anywhere i'm formatting a decimal (using myDecimal.ToString("C")) it's coming out with a $ sign.
am i missing somit?! is there a culture setting in umbraco that's overriding the web.config setting?!
just checking before i loose anymore hair...
Hi Jake
That sure sounds weird... Don't know if any of the suggestions here will work? http://stackoverflow.com/questions/9700934/how-to-change-en-us-dates-to-en-gb-for-asp-net
Perhaps leaving it to the browser by using "auto" might be the solution?
/Jan
it is kinda weird?!
i'd stumbled upon the stackoverflow post you mentioned in my googling and tried the suggestion. for a multilingual site, i think this'd work fine however the local set by the browser influences the output and the site i'm working on is uk facing (and the sales and only in gbp).
i've just set up a blank mvc project on my machine to test out if the globalization will work 'out of the box' as it were.
will report back the results!
thanks for taking the time to reply ;)
jake
Do you have a culture set on any node in umbraco?
Do'h! Of course...that's the obvious question to ask...I should have remembered that :) #h5is!
/Jan
hey there,
threw me a bit the setting a culture on an umbraco node as i wasn't aware you could!
so i took a look into it - right clicked my root not and selected 'culture and hostnames'.
the only options in the culture > language section are 'inherent' and 'en-US'.
ah ha!
so the follow up questions are:
1 - what does 'inherent' do?!
2 - how do i get 'en-GB' into the select list?!
feels like i'm one step closer ;)
Hi Jake
You can setup more languages in the "Settings" section by right clicking "Languages" and choose "Create".
Once that is done you can add it as a culture when setting up the hostname.
In regards to the "Inherit" setting I can't quite remember why it's there but in most cases I think it should just be set to "Inherit".
/Jan
Hi Jake
If you're up for it you might be learn something about the Umbraco Request pipeline by viewing these slides http://www.zpqrtbnk.net/media/1003/theumbraco6requestpipeline.pdf - Nevermind that it's for v6 since it works the same in v7.
/Jan
amazing! it worked! far out, that completely threw me ;)
learnt something new about umbraco today - too good.
can feel a blog post coming on...
thank you to everyone who posted a reply on this post, you've saved me the hair on my head ;)
p.s. as a follow up question, i wonder why my install only had 'en-US' in it? i'm based in the uk but using a peecee that is set up for australia. at work (all uk based systems) i've never had to set this up so i'm wondering if it's got somit to do with my home system...
Hi Jake
You're welcome - Happy to help.
The reason is simply that Umbraco is only setup with the en-US culture by default - If you need another culture you need to add it manually. It is like this no matter the culture on your PC etc.
/Jan
did a bit more playing with this and found that the 'inherit' settings appears to mean 'inheritthe culture from my ancestors'.
so in the example site i have, the root node is now set to 'en-GB'. i can have a node several child levels down and by default it'll inherit the root nodes culture. however, if i change the child node culture to 'en-US' it'll change the culture for just that node.
clever stuff ;)
Hi Jake
Ah yes makes sense actually - Just never used it in any scenarios myself but it's a nice option indeed. Can quickly think of scenarios where it's relevant. I learned something new as well now :) Thanks for sharing.
/Jan
is working on a reply...