You are developing an ASP.NET MVC application in Visual Studio 2012. The application supports
multiple cultures.
The application contains three resource files in the Resources directory:
ProductDictionary.resx
ProductDictionary.es.resx
ProductDictionary.fr.resx
Each file contains a public resource named Currency with the localized currency symbol. The
application is configured to set the culture based on the client browser settings.
The application contains a controller with the action defined in the following code segment. (Line
numbers are included for reference only.)
You need to set ViewBag.LocalizedCurrency to the localized currency contained in the resource files.
Which code segment should you add to the action at line 03?
A.
ViewBag.LocaIizedCurrency = Resources.ProductDictionary.Currency;
B.
VievBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject(“ProductDictionary”,
“Currency”, new System.Globalization.CultureInfo(Men”));
C.
VievBag.LocalizedCurrency = HttpContext.GetLocalResourceObject(“ProductDictionary”,
“Currency”);
D.
ViewBag.LocalizedCurrency = HttpContext.GetGlobalResourceObject(“ProductDictionary”,
“Currency”);
A. ViewBag.LocaIizedCurrency = Resources.ProductDictionary.Currency;