ResourceManager.GetNeutralResourcesLanguage Method

July 28, 2014

Returns the CultureInfo for the main assembly's neutral resources by reading the value of the NeutralResourcesLanguageAttribute on a specified Assembly.

Namespace:  System.Resources
Assembly:  mscorlib (in mscorlib.dll)

protected static CultureInfo GetNeutralResourcesLanguage(
	Assembly a
)

Parameters

a
Type: System.Reflection.Assembly
The assembly for which to return a CultureInfo.

Return Value

Type: System.Globalization.CultureInfo
The culture from the NeutralResourcesLanguageAttribute, if found; otherwise, CultureInfo.InvariantCulture.

Use this method in derived classes of the ResourceManager to speed up lookups in one particular culture. For example, if this method returns "en-US" for the CultureInfo, then any U.S. English resource lookups will go straight to the main assembly and not look for the "en-US" nor "en" satellite assemblies.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft