Which code segment is used to automatically load French resources…?

You are busy to develop a Microsoft Windows Forms application that has localized resources for the French language.
Which code segment is used to automatically load French resources but use the

United States format for all currencies, numbers, dates and times?

You are busy to develop a Microsoft Windows Forms application that has localized resources for the French language.
Which code segment is used to automatically load French resources but use the United States format for all currencies, numbers, dates and times?

A.
Thread.CurrentThread.CurrentCulture = new CultureInfo[“en-US”]; Thread.CurrentThread.CurrentUICulture = new CultureInfo[“fr”];

B.
Thread.CurrentThread.CurrentCulture = new CultureInfo[“FR”]; Thread.CurrentThread.CurrentUICulture = new CultureInfo[“US”];

C.
Thread.CurrentThread.CurrentCulture = new CultureInfo[“US”]; Thread.CurrentThread.CurrentUICulture = new CultureInfo[“FR”];

D.
Thread.CurrentThread.CurrentCulture = new CultureInfo[“fr-FR”]; Thread.CurrentThread.CurrentUICulture = new CultureInfo[“en-US”];

Explanation:
The CurrentUICulture should be set to the CultureInfo instance that represents the fr neutral culture. The fr neutral culture represents the French language.

Incorrect Answers:
B, C, D: The CurrentCulture property must be avoided, that represents the fr-FR culture. This will give the format for all currencies, numbers, dates and times in French, you want to leave it o the United States format. The en-US will show that the English resources will be locked. Furthermore, you should not set the CurrentCulture property to US. It should be set to specify the culture.



Leave a Reply 0

Your email address will not be published. Required fields are marked *