Hi,
I have a multi-lingual website. I've created a structure and I have 2 languages (en-us and da-Dk).
The culture and language works fine on most pages, but it one when I check "System.Threading.Thread.CurrentThread.CurrentCulture" it returns "en-GB" :|
I even tried to changed the language on the page to use da-DK to find the problem, but it still returns "en-GB".
I am really confused, because there is no GB culture anywhere inside my whole structure. :O
Hi Tim,
Thanks for the reply.
I have a surface controller, and in there I check the culture. (well I want to use GetDictionaryValue but it doesn't work because of wrong culture setting on the thread :|)
I am testing the solution on my dev machine, and I've only installed en-us and da-dk on my system. (I have iis 8.5 on windows 8.1)
I have the exact same problem: down in my surface controller the CurrentCulture is always set to the default language, in my case en-US. Have you managed to solve this?
EDIT: I just managed to solve this, see my post further down.
Hi Tim,
Thanks for reply. I don't have en-GB anywhere. I have 2 languages in Umbraco "English (US)" and "Danish". I don't understand how it find en-GB at all
I had the exact same problem: down in my surface controller, the CurrentCulture was always set to the default culture, in my case en-US. However, I managed to solve it through the stackoverflow article mentioned above. The very simple solution was given in the last post by Shreyas. You simply add this to your web.config:
Current Culture returns a wrong value
Hi, I have a multi-lingual website. I've created a structure and I have 2 languages (en-us and da-Dk). The culture and language works fine on most pages, but it one when I check "System.Threading.Thread.CurrentThread.CurrentCulture" it returns "en-GB" :|
I even tried to changed the language on the page to use da-DK to find the problem, but it still returns "en-GB".
I am really confused, because there is no GB culture anywhere inside my whole structure. :O
Comment author was deleted
Where in the code are you checking that? Could it be that the server lang is en-GB?
Hi Tim, Thanks for the reply. I have a surface controller, and in there I check the culture. (well I want to use GetDictionaryValue but it doesn't work because of wrong culture setting on the thread :|)
I am testing the solution on my dev machine, and I've only installed en-us and da-dk on my system. (I have iis 8.5 on windows 8.1)
I have the exact same problem: down in my surface controller the CurrentCulture is always set to the default language, in my case en-US. Have you managed to solve this?
EDIT: I just managed to solve this, see my post further down.
Comment author was deleted
Strange indeed, and en-gb isn't setup as a language in Umbraco either?
Hi Tim, Thanks for reply. I don't have en-GB anywhere. I have 2 languages in Umbraco "English (US)" and "Danish". I don't understand how it find en-GB at all
Hi Ashkan, You can check like this
Manish
Hi Manish,
Thanks for the reply. I've tried your code.I have 2 domains, 1 with Danish language and the other with English-US. No trace of en-GB :|
Hi Ashkan
Have you set culture like this
Manish
Hi Manish, Thanks again for reply. Yes. my domain settings is like this:
Ashkan
Have you cleared app_data folder?
Manish
Hi Ashkan
Can you retrieve culture on basis of node id as i gave you code above for this
instead of using Thread.CurrentThread.CurrentCulture
here why your solution is not working http://stackoverflow.com/questions/13915123/currentthread-currentuiculture-is-set-correctly-but-get-always-en-us
So you can use umbraco library as i suggested above
Manish
I had the exact same problem: down in my surface controller, the CurrentCulture was always set to the default culture, in my case en-US. However, I managed to solve it through the stackoverflow article mentioned above. The very simple solution was given in the last post by Shreyas. You simply add this to your web.config:
is working on a reply...