Search Results for

    Show / Hide Table of Contents

    Class LanguageRegistryApi

    Api providing all the LanguageRegistry operations

    Inheritance
    System.Object
    LanguageRegistryApi
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.Core.Globalization.LanguageRegistry
    Assembly: Sdl.Core.Globalization.dll
    Syntax
    public sealed class LanguageRegistryApi

    Properties

    Instance

    Returns an instance of the LanguageRegistryApi singleton

    Declaration
    public static LanguageRegistryApi Instance { get; }
    Property Value
    Type Description
    LanguageRegistryApi

    Methods

    DeserializeObject(String)

    Deserialize object from JSON

    Declaration
    public void DeserializeObject(string value)
    Parameters
    Type Name Description
    System.String value

    GetAllLanguages()

    Gets all the languages registered

    Declaration
    public IList<Language> GetAllLanguages()
    Returns
    Type Description
    System.Collections.Generic.IList<Language>

    List with all available languages

    GetAllNeutralLanguages()

    Gets all the neutral languages registered

    Declaration
    public IList<Language> GetAllNeutralLanguages()
    Returns
    Type Description
    System.Collections.Generic.IList<Language>

    List with all the neutral languages

    GetAllRegisteredProducts()

    Presents a list of all the products supported by the model

    Declaration
    public IList<Product> GetAllRegisteredProducts()
    Returns
    Type Description
    System.Collections.Generic.IList<Product>

    list of Product objects

    GetAllSpecificLanguages()

    Gets all the specific languages registered, these are cultures not neutral

    Declaration
    public IList<Language> GetAllSpecificLanguages()
    Returns
    Type Description
    System.Collections.Generic.IList<Language>

    List with all specific languages

    GetAlternativeLanguageCodes(String, String)

    Gets an alternative language code for the language represented by languageCode and for product represented by productId

    Declaration
    public IList<AlternativeLanguageCode> GetAlternativeLanguageCodes(string productId, string languageCode)
    Parameters
    Type Name Description
    System.String productId
    System.String languageCode
    Returns
    Type Description
    System.Collections.Generic.IList<AlternativeLanguageCode>

    string that represents the alternative language code for the language and the product given

    GetLanguage(String)

    Gets a language based on a code

    Declaration
    public Language GetLanguage(string languageCode)
    Parameters
    Type Name Description
    System.String languageCode

    Searched code

    Returns
    Type Description
    Language

    Language having the languageCode Code/null if such language is not found

    GetLanguage(String, String)

    Gets a language based on an alternative code and product ID

    Declaration
    public Language GetLanguage(string alternativeLanguageCode, string productId)
    Parameters
    Type Name Description
    System.String alternativeLanguageCode

    Searched alternative code

    System.String productId

    Searched product ID

    Returns
    Type Description
    Language

    Language that has the given alternative code for the given product

    GetProductSpecificCodeWithFallback(String, String, String, out MappingType)

    Returns the best available mapping from sourceProduct to targetProduct for sourceLanguageCode. If sourceLanguage doesn't have a mapping, it falls back to its parent and the parent's defaultSpecificLanguage

    Declaration
    public IList<AlternativeLanguageCode> GetProductSpecificCodeWithFallback(string sourceProductId, string sourceLanguageCode, string targetProductId, out MappingType mappingType)
    Parameters
    Type Name Description
    System.String sourceProductId
    System.String sourceLanguageCode
    System.String targetProductId
    MappingType mappingType
    Returns
    Type Description
    System.Collections.Generic.IList<AlternativeLanguageCode>

    GetSupportedLanguages(String)

    Gets all supported languages for a given product

    Declaration
    public IList<Language> GetSupportedLanguages(string productId)
    Parameters
    Type Name Description
    System.String productId

    Id of the searched product

    Returns
    Type Description
    System.Collections.Generic.IList<Language>

    Array of all supported languages for a product

    Initialize()

    Initializer of the Registry

    Declaration
    public void Initialize()

    SerializeObject()

    Serialization of the object to JSON

    Declaration
    public string SerializeObject()
    Returns
    Type Description
    System.String

    On this page

    • Properties
      • Instance
    • Methods
      • DeserializeObject(String)
      • GetAllLanguages()
      • GetAllNeutralLanguages()
      • GetAllRegisteredProducts()
      • GetAllSpecificLanguages()
      • GetAlternativeLanguageCodes(String, String)
      • GetLanguage(String)
      • GetLanguage(String, String)
      • GetProductSpecificCodeWithFallback(String, String, String, out MappingType)
      • GetSupportedLanguages(String)
      • Initialize()
      • SerializeObject()
    Back to top Generated by DocFX