Search Results for

    Show / Hide Table of Contents

    Interface ILocalizationService

    Localization service returns strings based on language keys.

    Namespace: Simplic.Localization
    Assembly: Simplic.Localization.dll
    Syntax
    public interface ILocalizationService

    Properties

    | Improve this Doc View Source

    CurrentLanguage

    Gets the current language

    Declaration
    CultureInfo CurrentLanguage { get; }
    Property Value
    Type Description
    System.Globalization.CultureInfo

    System.Globalization.CultureInfo Current language

    Methods

    | Improve this Doc View Source

    ChangeLanguage(CultureInfo)

    Changes the current language

    Declaration
    void ChangeLanguage(CultureInfo language)
    Parameters
    Type Name Description
    System.Globalization.CultureInfo language

    Language to change

    | Improve this Doc View Source

    GetAvailableLanguages()

    Returns a list of available languages

    Declaration
    IList<CultureInfo> GetAvailableLanguages()
    Returns
    Type Description
    System.Collections.Generic.IList<System.Globalization.CultureInfo>

    a list of available languages

    | Improve this Doc View Source

    LoadDatabaseLocalization()

    Load localization from the database

    Declaration
    void LoadDatabaseLocalization()
    | Improve this Doc View Source

    Search(String)

    Searches the key list and returns the matching keys

    Declaration
    IDictionary<string, string> Search(string searchKey)
    Parameters
    Type Name Description
    System.String searchKey

    Search text

    Returns
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.String>

    Result

    | Improve this Doc View Source

    Translate(String)

    Translates a key to a language

    Declaration
    string Translate(string key)
    Parameters
    Type Name Description
    System.String key

    Key to translate

    Returns
    Type Description
    System.String

    Translated text

    | Improve this Doc View Source

    Translate(String, String[])

    Translates a key formatted to a language

    Declaration
    string Translate(string key, params string[] formatValues)
    Parameters
    Type Name Description
    System.String key

    Key to translate

    System.String[] formatValues

    Values to put in the string interpolation

    Returns
    Type Description
    System.String

    Translated formatted text

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx