Resource.resx and CultureInfo
Posted: Thu Jan 12, 2017 10:50 pm
Hello Team,
2 questions about Resource file.
Q1
I created a resource file 'DefaultResource.resx' in Projects Configure.
In the file, key-value and culture are setted.
for example: SupportedCultures:ja-JP.
In the simulator, we can get the value according to the key.
But in the browser, exception "No resources available for culture 'ja-JP'." occurred.
Any idea about the error above? An example of how to use resource.resx in CSHTML5 is really helpful.
Q2
In the simulator,we can not get the value ‘System.Globalization.CultureInfo.CurrentUICulture.name’.
Is 'System.Globalization.CultureInfo.CurrentUICulture' supported in CSHTML5?
Thanks.
2 questions about Resource file.
Q1
I created a resource file 'DefaultResource.resx' in Projects Configure.
In the file, key-value and culture are setted.
for example: SupportedCultures:ja-JP.
In the simulator, we can get the value according to the key.
But in the browser, exception "No resources available for culture 'ja-JP'." occurred.
Any idea about the error above? An example of how to use resource.resx in CSHTML5 is really helpful.
Q2
In the simulator,we can not get the value ‘System.Globalization.CultureInfo.CurrentUICulture.name’.
Is 'System.Globalization.CultureInfo.CurrentUICulture' supported in CSHTML5?
Thanks.