using Abp.Configuration.Startup;
using Abp.Localization;
using Abp.Localization.Dictionaries;
using Abp.Localization.Dictionaries.Json;
using Abp.Localization.Sources;
using Abp.Reflection.Extensions;

namespace YGNT.QuestionLibrary.Core.Localization
{
    public static class QuestionLibraryLocalizationConfigurer
    {
        public static void Configure(ILocalizationConfiguration localizationConfiguration)
        {
            localizationConfiguration.Sources.Add(
                new DictionaryBasedLocalizationSource(QuestionLibraryConsts.LocalizationSourceName,
                    new JsonEmbeddedFileLocalizationDictionaryProvider(
                        typeof(QuestionLibraryLocalizationConfigurer).GetAssembly(),
                        "YGNT.QuestionLibrary.Core.Localization.SourceFiles"
                    )
                )
            );
        }
    }
}