Click or drag to resize
CultureInfoExtensionsGetCultureInfo Method (String)
Similar to GetCultureInfo(String), but covers culture names (<language-code>-<region-code>) which are used by SDLX and Trados Translator's Workbench, but have a different code in .Net.

Use this method to transparently map language codes (current and legacy ones) to cultures, for example when processing TTX, ITD, or TMX.

Namespace: Sdl.LanguagePlatform.Core
Assembly: Sdl.LanguagePlatform.Core (in Sdl.LanguagePlatform.Core.dll) Version: 1.6.0.0 (1.7.3164.0)
Syntax
public static CultureInfo GetCultureInfo(
	string name
)

Parameters

name
Type: SystemString
The culture code

Return Value

Type: CultureInfo
A CultureInfo object, using appropriate fallbacks for backwards compatibility. Throws an exeption if neither the fallback heuristics nor .Net can resolve the culture name.
Remarks
To avoid an exception to be thrown, and to get null for unknown culture codes, use GetCultureInfo(String, Boolean).
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments