-1

I have a resx file in a dll A thas contains french and english traductions. The ressource file are public. When I acces to the ressource in the class A after setting the currentThread,

Ressource.LibelleHead

I get english or french version.

Now I use the dll A in the dll B, I set the thread in the dll B and I call the same ressource Ressource.LibelleHead with the french thread but i have always the some result: english

How can I resolve this?

user1428798
  • 1,534
  • 3
  • 24
  • 50

2 Answers2

0

I bet that call is going through your current thread. Have you tried setting the Thread.CurrentCulture = "fr-FR";

Ross Bush
  • 14,648
  • 2
  • 32
  • 55
  • When I set my thread in the dll A in french it's ok but using dll A in B and with setting french thread I have always english – user1428798 Oct 25 '16 at 15:51
  • Can you break just before you access Resource.LibeleHead and inspect the Main Thread's CurrentCulture property? Perhaps something has set it back to the default culture. – Ross Bush Oct 25 '16 at 15:54
0

You need to set a breakpoint and step by step find a result. The answer probably in ResourceManager auto generated class of assembly A, its code quite straightforward. But first check CurrentCulture and CurrentUICulture of calling Thread, language could be selected on the base of thread's culture.

olk
  • 199
  • 1
  • 2
  • 8