0

I am setting the locale of my application using

Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-GB");

but my "Resource.en-GB.resx" is not loading. It works for en-US, but for en-GB completely ignores it and drops back to the default "Resource.resx" file.

Chris
  • 27,210
  • 6
  • 71
  • 92
pengibot
  • 1,492
  • 3
  • 15
  • 35
  • @Tim Schmelter I double checked and it is installed, I am also in the United Kingdom so PC is running in en-GB lol – pengibot Oct 16 '12 at 09:27
  • 1
    Yes, i've deleted the comment after i've seen where you're from. – Tim Schmelter Oct 16 '12 at 09:34
  • try 'en-gb' instead of 'en-GB' – Flakes Oct 16 '12 at 09:41
  • @Flakes tried 'en-gb' already and doesn't work. en-CA also works, just not en-GB? It doesn't even fall down to the en language folder like any other en-XX would do it if couldn't find the resource. – pengibot Oct 16 '12 at 09:45
  • Maybe is stupid, but you checked your ouput folder container this en-GB? – ígor Oct 16 '12 at 11:27
  • @ígor Yep definitely there, I have duplicated it for en-CA and this works fine. tried it on a simple test project and this has the same issue using bare bones setup. – pengibot Oct 16 '12 at 11:30
  • Only thing I can think of as to why this is happening is that my default language and locale is en-gb so it is simply using default. will investigate further to see if i can come up with a useful answer – pengibot Oct 17 '12 at 15:45

1 Answers1

1

Remove the configuration and should work.

[assembly: NeutralResourcesLanguage("en-GB")]

See the link http://msdn.microsoft.com/en-us/library/system.resources.neutralresourceslanguageattribute.aspx

ctescu
  • 350
  • 4
  • 16
  • Yep that was it, makes sense now. I have ended up getting rid of all the en-GB and en resources now and just falling back to the default resource file which is sort of the same behaviour I guess just not having to put in more resource files. Thanks @ctescu – pengibot Oct 24 '12 at 15:55