C# Class SIL.CoreImpl.VariantSubtag

This class represents a variant from the IANA language subtag registry.
Inheritance: Subtag
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Méthodes publiques

Méthode Description
ExtractLanguageCode ( string variant ) : string

When Language is "qaa" we embed the language name as the first private-use element (after any initial x- or embedded -x-) in the variant. Extract this and return it.

IsVariantOf ( string langTag ) : bool

Determines whether this subtag can be used with the specified lang tag.

VariantSubtag ( VariantSubtag subtag, string name ) : System

Initializes a new instance of the T:VariantSubtag class.

VariantSubtag ( string code, string name, bool isPrivateUse, IEnumerable prefixes ) : System

Initializes a new instance of the T:VariantSubtag class.

Private Methods

Méthode Description
RemovePrivateLanguageName ( string code ) : string

Assuming the input is a variant which is or contains a private language name, remove it and return the rest. Return an empty string if there is nothing else.

Method Details

ExtractLanguageCode() public static méthode

When Language is "qaa" we embed the language name as the first private-use element (after any initial x- or embedded -x-) in the variant. Extract this and return it.
public static ExtractLanguageCode ( string variant ) : string
variant string
Résultat string

IsVariantOf() public méthode

Determines whether this subtag can be used with the specified lang tag.
public IsVariantOf ( string langTag ) : bool
langTag string The lang tag.
Résultat bool

VariantSubtag() public méthode

Initializes a new instance of the T:VariantSubtag class.
public VariantSubtag ( VariantSubtag subtag, string name ) : System
subtag VariantSubtag The subtag.
name string The name.
Résultat System

VariantSubtag() public méthode

Initializes a new instance of the T:VariantSubtag class.
public VariantSubtag ( string code, string name, bool isPrivateUse, IEnumerable prefixes ) : System
code string The code.
name string The name.
isPrivateUse bool if set to true this is a private use subtag.
prefixes IEnumerable The prefixes.
Résultat System