| CultureInfoExtensionsGetCultureInfo Method (String, Boolean) |
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.CoreAssembly: Sdl.LanguagePlatform.Core (in Sdl.LanguagePlatform.Core.dll) Version: 1.6.0.0 (1.7.3164.0)
Syntaxpublic static CultureInfo GetCultureInfo(
string name,
bool returnNullForUnknowns
)
Public Shared Function GetCultureInfo (
name As String,
returnNullForUnknowns As Boolean
) As CultureInfo
public:
static CultureInfo^ GetCultureInfo(
String^ name,
bool returnNullForUnknowns
)
static member GetCultureInfo :
name : string *
returnNullForUnknowns : bool -> CultureInfo
Parameters
- name
- Type: SystemString
The culture code - returnNullForUnknowns
- Type: SystemBoolean
If true, null is returned for unknown culture codes. If false, an exception is thrown if
the culture code cannot be resolved.
Return Value
Type:
CultureInfoA CultureInfo object, using appropriate fallbacks for backwards compatibility, or
null if the culture code cannot be resolved and
returnNullForUnknowns is
true.
See Also
Comments