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 SourceGetByIsoCode(String)
Declaration
ILanguage GetByIsoCode(string isoCode)
Parameters
Type | Name | Description |
---|---|---|
System.String | isoCode |
Returns
Type | Description |
---|---|
ILanguage |
GetDefaultId()
Gets the default language identifier.
Declaration
int? GetDefaultId()
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
Remarks
This can be optimized and bypass all deep cloning.
GetDefaultIsoCode()
Gets the default language ISO code.
Declaration
string GetDefaultIsoCode()
Returns
Type | Description |
---|---|
System.String |
Remarks
This can be optimized and bypass all deep cloning.
GetIdByIsoCode(String, Boolean)
Gets a language identifier from its ISO code.
Declaration
int? GetIdByIsoCode(string isoCode, bool throwOnNotFound = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | isoCode | |
System.Boolean | throwOnNotFound |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> |
Remarks
This can be optimized and bypass all deep cloning.
GetIsoCodeById(Nullable<Int32>, Boolean)
Gets a language ISO code from its identifier.
Declaration
string GetIsoCodeById(int? id, bool throwOnNotFound = true)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | id | |
System.Boolean | throwOnNotFound |
Returns
Type | Description |
---|---|
System.String |
Remarks
This can be optimized and bypass all deep cloning.