C# Class SIL.FieldWorks.FDO.DomainServices.DataMigration.Version19LangTagUtils

Fragments we need of LangTagUtils, compatible with expectations for version 19.
Afficher le fichier Open project: sillsdev/FieldWorks

Méthodes publiques

Méthode Description
GetLanguageSubtag ( string code ) : LanguageSubtag

Gets the language subtag with the specified code.

GetRegionSubtag ( string code ) : RegionSubtag

Gets the region subtag with the specified code.

GetScriptSubtag ( string code ) : ScriptSubtag

Gets the script subtag with the specified code.

GetSubtags ( string langTag, LanguageSubtag &languageSubtag, ScriptSubtag &scriptSubtag, RegionSubtag &regionSubtag, VariantSubtag &variantSubtag ) : bool

Gets the subtags of the specified language tag.

GetVariantSubtag ( string code ) : VariantSubtag

Gets the variant subtag with the specified code.

IsPrivateUseRegionCode ( string regionCode ) : bool
ToLangTag ( LanguageSubtag languageSubtag, ScriptSubtag scriptSubtag, RegionSubtag regionSubtag, VariantSubtag variantSubtag ) : string

Generates a language tag from the specified subtags.

ToLangTag ( string icuLocale ) : string

Converts the specified ICU locale to a language tag. If the ICU locale is already a valid language tag, it will return it.

Private Methods

Méthode Description
NextSubTag ( string subTags, int &subTagIndex, bool &privateUsePrefix ) : string
TranslateVariantCode ( string variantCode, string>.Func defaultFunc ) : string

Translates standard variant codes to their expanded (semi-human-readable) format; all others are translated using the given function.

Version19LangTagUtils ( ) : System

Method Details

GetLanguageSubtag() public static méthode

Gets the language subtag with the specified code.
public static GetLanguageSubtag ( string code ) : LanguageSubtag
code string The code.
Résultat SIL.CoreImpl.LanguageSubtag

GetRegionSubtag() public static méthode

Gets the region subtag with the specified code.
public static GetRegionSubtag ( string code ) : RegionSubtag
code string The code.
Résultat SIL.CoreImpl.RegionSubtag

GetScriptSubtag() public static méthode

Gets the script subtag with the specified code.
public static GetScriptSubtag ( string code ) : ScriptSubtag
code string The code.
Résultat SIL.CoreImpl.ScriptSubtag

GetSubtags() public static méthode

Gets the subtags of the specified language tag.
public static GetSubtags ( string langTag, LanguageSubtag &languageSubtag, ScriptSubtag &scriptSubtag, RegionSubtag &regionSubtag, VariantSubtag &variantSubtag ) : bool
langTag string The language tag.
languageSubtag SIL.CoreImpl.LanguageSubtag The language subtag.
scriptSubtag SIL.CoreImpl.ScriptSubtag The script subtag.
regionSubtag SIL.CoreImpl.RegionSubtag The region subtag.
variantSubtag SIL.CoreImpl.VariantSubtag The variant subtag.
Résultat bool

GetVariantSubtag() public static méthode

Gets the variant subtag with the specified code.
public static GetVariantSubtag ( string code ) : VariantSubtag
code string The code.
Résultat SIL.CoreImpl.VariantSubtag

IsPrivateUseRegionCode() public static méthode

public static IsPrivateUseRegionCode ( string regionCode ) : bool
regionCode string
Résultat bool

ToLangTag() public static méthode

Generates a language tag from the specified subtags.
public static ToLangTag ( LanguageSubtag languageSubtag, ScriptSubtag scriptSubtag, RegionSubtag regionSubtag, VariantSubtag variantSubtag ) : string
languageSubtag SIL.CoreImpl.LanguageSubtag The language subtag.
scriptSubtag SIL.CoreImpl.ScriptSubtag The script subtag.
regionSubtag SIL.CoreImpl.RegionSubtag The region subtag.
variantSubtag SIL.CoreImpl.VariantSubtag The variant subtag.
Résultat string

ToLangTag() public static méthode

Converts the specified ICU locale to a language tag. If the ICU locale is already a valid language tag, it will return it.
public static ToLangTag ( string icuLocale ) : string
icuLocale string The ICU locale.
Résultat string