Click or drag to resize
CultureInfoExtensions Class
Utilities related to CultureInfo objects.
Inheritance Hierarchy
SystemObject
  Sdl.LanguagePlatform.CoreCultureInfoExtensions

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 class CultureInfoExtensions

The CultureInfoExtensions type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberLegacyLanguageCodeMapping
Gets a mapping from legacy language codes to .Net language codes. The mapping maps from legacy language codes as they are used by SDLX and Trados Translator's Workbench and related applications to the closest language code used by .Net.

This is an internal data structure which should not be directly used and not be modified. To look up a legacy code, use GetMappedCultureCodeForLegacyCode(String).

Top
Methods
  NameDescription
Public methodStatic memberAreCompatible
Checks whether two cultures (languages) are compatible. Two cultures are compatible if they denote the same language which means they have to be identical or their closest region-neutral parents are identical.
Public methodStatic memberGetCultureInfo(Int32)
Returns the culture which corresponds to the specified LCID. If the LCID is unknown or invalid, an exception is thrown. Note that this will also be the case for custom cultures, which seem to always get the same LCID (4096).
Public methodStatic memberGetCultureInfo(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.

Public methodStatic memberGetCultureInfo(Int32, Boolean)
Returns the culture which corresponds to the specified locale, which may be a legacy LCID used internally by SDLX or Trados Translator's Workbench.
Public methodStatic memberGetCultureInfo(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.

Public methodStatic memberGetLanguageGroupID
Returns the LanguageGroupID associated with the specified culture.
Public methodStatic memberGetLanguageGroupName
Returns the name of the language group for the specified culture as a string.
Public methodStatic memberGetLeadingClitics
Returns a case-sensitive string hash set containing the leading separable clitics for the provided culture, or null if none are defined.
Public methodStatic memberGetMappedCultureCodeForLegacyCode
Assumes the passed culture code is a legacy code and returns the mapped equivalent. null is returned if no mapping exists (which means that the code is not a legacy code or no mapping is required or yet specified).
Public methodStatic memberGetRegionNeutralCulture
Computes and returns the region-neutral parent culture of the input culture. If the input culture is already neutral, it is returned. Otherwise, the parent culture hierarchy is traversed until a region-neutral culture is found.
Public methodStatic memberGetRegionQualifiedCulture(CultureInfo)
Heuristically computes and returns the region-specified ("default") culture for a given language. If the input culture is not neutral (i.e. it is region-specific), it is returned. Otherwise the method will find the region-qualified culture which most likely represents the culture's default/major region.
Public methodStatic memberGetRegionQualifiedCulture(String)
Heuristically computes and returns the region-specified ("default") culture code for a given language code. If the input culture is not neutral or does not have a region-qualified equivalent, null is returned.
Public methodStatic memberGetTrailingClitics
Returns a case-sensitive string hash set containing the trailing separable clitics for the provided culture, or null if none are defined.
Public methodStatic memberIsRomanceLanguage
Determines whether the specified culture info is any of the romance languages: French, Spanish, Portuguese, Italian, Romanian, Galician or Catalan.
Public methodStatic memberUseBlankAsSentenceSeparator
Determines whether the specified culture uses blanks as sentence separators. This is currently only true for Thai.
Public methodStatic memberUseBlankAsWordSeparator
Determines whether the specified culture uses blanks as word separators. This is true for all cultures except those based on Japanese, Thai, or Chinese.
Public methodStatic memberUseFullWidth
returns true for CJK cultures
Public methodStatic memberUsesClitics
Determines whether the specified culture uses clitics (English and the romance languages).
Public methodStatic memberUsesDefaultDigits
Determines whether the specified culture uses the standard default digits.
Public methodStatic memberUsesStandardNumberGrouping
Determines whether the provided culture uses standard three-digit grouping for number formatting.
Top
See Also
Community
Edit

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