Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

LanguageModel.cs

using Microsoft.AspNetCore.Mvc.Rendering;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

namespace Nop.Web.Areas.Admin.Models.Localization;

/// 
/// Represents a language model
/// 
public partial record LanguageModel : BaseNopEntityModel, IStoreMappingSupportedModel
{
    #region Ctor

    public LanguageModel()
    {
        AvailableCurrencies = new List();
        AvailableFlagImages = new List();
        SelectedStoreIds = new List();
        AvailableStores = new List();
        LocaleResourceSearchModel = new LocaleResourceSearchModel();
    }

    #endregion

    #region Properties

    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.Name")]
    public string Name { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.LanguageCulture")]
    public string LanguageCulture { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.UniqueSeoCode")]
    public string UniqueSeoCode { get; set; }

    //flags
    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.FlagImageFileName")]
    public string FlagImageFileName { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.Rtl")]
    public bool Rtl { get; set; }

    //default currency
    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.DefaultCurrency")]
    public int DefaultCurrencyId { get; set; }

    public IList AvailableCurrencies { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.Published")]
    public bool Published { get; set; }

    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.DisplayOrder")]
    public int DisplayOrder { get; set; }

    //store mapping
    [NopResourceDisplayName("Admin.Configuration.Languages.Fields.LimitedToStores")]
    public IList SelectedStoreIds { get; set; }

    public IList AvailableFlagImages { get; set; }

    public IList AvailableStores { get; set; }

    // search
    public LocaleResourceSearchModel LocaleResourceSearchModel { get; set; }

    #endregion
}