<Assembly: NeutralResourcesLanguageAttribute("fr", UltimateResourceFallbackLocation.Satellite)>
Here you are specifying that the assembly's default language is French.
Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr")
Here you are specifying that the current thread's culture is French.
The end result is the same, really. In the second example, if you set your CurrentUICulture to the default language (I think that's right) after setting it to French, it would change back to whatever the default language is for the assembly (usually English...
silly Americans).
In the first example, however, you've overriden the default language and said that it should be French.
None
0 Points
6 Posts
whats the difference between these statements?
Apr 03, 2006 06:03 AM|Nani1980|LINK
<Assembly: NeutralResourcesLanguageAttribute("fr", UltimateResourceFallbackLocation.Satellite)>
and
Thread.CurrentThread.CurrentUICulture =
New CultureInfo("fr")both will set the default culture as FR...so what is the difference..can anyone explain ..
THNX
Member
190 Points
87 Posts
Re: whats the difference between these statements?
Apr 10, 2006 09:55 PM|andersonimes|LINK
<Assembly: NeutralResourcesLanguageAttribute("fr", UltimateResourceFallbackLocation.Satellite)>
Here you are specifying that the assembly's default language is French.
Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr")
Here you are specifying that the current thread's culture is French.
The end result is the same, really. In the second example, if you set your CurrentUICulture to the default language (I think that's right) after setting it to French, it would change back to whatever the default language is for the assembly (usually English... silly Americans).
In the first example, however, you've overriden the default language and said that it should be French.
Member
22 Points
700 Posts
Re: whats the difference between these statements?
Apr 12, 2006 01:35 PM|rmprimo|LINK
<Assembly: NeutralResourcesLanguageAttribute("fr", UltimateResourceFallbackLocation.Satellite)>
only deals with the default. If a user's culture is not supported it would default to French and not invariant.
The other statement deals with the current culture. CURRENT IS NOT DEFAULT.
HTH
Rob