Search Results for

    Show / Hide Table of Contents
    View Source

    Interface ILanguageRepository

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface ILanguageRepository : IReadWriteQueryRepository<int, ILanguage>, IReadRepository<int, ILanguage>, IWriteRepository<ILanguage>, IQueryRepository<ILanguage>, IRepository

    Methods

    View Source

    GetByIsoCode(string)

    Declaration
    ILanguage? GetByIsoCode(string isoCode)
    Parameters
    Type Name Description
    string isoCode
    Returns
    Type Description
    ILanguage
    View Source

    GetDefaultId()

    Gets the default language identifier.

    Declaration
    int? GetDefaultId()
    Returns
    Type Description
    int?
    Remarks

    This can be optimized and bypass all deep cloning.

    View Source

    GetDefaultIsoCode()

    Gets the default language ISO code.

    Declaration
    string GetDefaultIsoCode()
    Returns
    Type Description
    string
    Remarks

    This can be optimized and bypass all deep cloning.

    View Source

    GetIdByIsoCode(string?, bool)

    Gets a language identifier from its ISO code.

    Declaration
    int? GetIdByIsoCode(string? isoCode, bool throwOnNotFound = true)
    Parameters
    Type Name Description
    string isoCode
    bool throwOnNotFound
    Returns
    Type Description
    int?
    Remarks

    This can be optimized and bypass all deep cloning.

    View Source

    GetIsoCodeById(int?, bool)

    Gets a language ISO code from its identifier.

    Declaration
    string? GetIsoCodeById(int? id, bool throwOnNotFound = true)
    Parameters
    Type Name Description
    int? id
    bool throwOnNotFound
    Returns
    Type Description
    string
    Remarks

    This can be optimized and bypass all deep cloning.

    View Source

    GetIsoCodesByIds(ICollection<int>, bool)

    Gets multiple language ISO codes from the provided Ids.

    Declaration
    string[] GetIsoCodesByIds(ICollection<int> ids, bool throwOnNotFound = true)
    Parameters
    Type Name Description
    ICollection<int> ids

    The language Ids.

    bool throwOnNotFound

    Indicates whether to throw an exception if the provided Id is not found as a language.

    Returns
    Type Description
    string[]
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX