Skip to content

wpaap/cms-localization

 
 

Repository files navigation

cms-localization

Multi-language content management system, .Net Core CRUD project also include auto-mapper. Thanks to ILocalizedModel, dynamically content can be saved in different languages.

    protected virtual void AddLocales<TLocalizedModelLocal>(ILanguageRepository languageService, IList<TLocalizedModelLocal> locales) where TLocalizedModelLocal : ILocalizedModelLocal
    {
        AddLocales(languageService, locales, null);
    }

    protected virtual void AddLocales<TLocalizedModelLocal>(ILanguageRepository languageService, IList<TLocalizedModelLocal> locales, Action<TLocalizedModelLocal, int> configure) where TLocalizedModelLocal : ILocalizedModelLocal
    {
        foreach (var language in languageService.GetAll())
        {
            var locale = Activator.CreateInstance<TLocalizedModelLocal>();
            locale.LanguageId = language.Id;
            if (configure != null)
            {
                configure.Invoke(locale, locale.LanguageId);
            }
            locales.Add(locale);
        }
    }

Pre-requisites

  1. .Net 7 SDK
  2. Visual studio 2017 or newer OR VSCode with C# extension
  3. Microsoft SQL Server (Optional: If MS SQL server required instead of Sqlite during development)

Installation

  1. Clone the repo: git clone https://github.com/bernalbant/cms-localization.git
  2. Create database: SqlLocalDB.exe create "CmsLocalizationLocalDB" 15.0 -s
  3. Update database: dotnet ef database update
  4. Run .Net project: F5 from either Visual Studio IDE OR [VScode] (https://code.visualstudio.com/):

About

Simple multi-language .Net Core CMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • SCSS 72.0%
  • C# 19.6%
  • HTML 8.4%