Hi. In our project, We decided to separate the core of each activity as module itself like "Inventory", "Purchase". And in each, I have defined Navigation Menus as well. Along with custom Localizatation. But the entry in the xml file is not visible in admin panned so that to edit it.
Purcahase Module
PurchaseConsts.cs
public class PurchaseConsts
{
public const string LocalizationSourceName = "Purchase";
}
PurchaseModule.cs
//SASCoreModule is the main core module
[DependsOn(typeof(SASCoreModule), typeof(InventoryModule))]
public class PurchaseModule : AbpModule
{
public override void PreInitialize()
{
//Add/remove localization sources
Configuration.Localization.Sources.Add(
new DictionaryBasedLocalizationSource(
PurchaseConsts.LocalizationSourceName,
new XmlEmbeddedFileLocalizationDictionaryProvider(
Assembly.GetExecutingAssembly(),
"JPY.SAS.Core.Purchase.Localization.Purchase"
)
)
);
}
public override void Initialize() { IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly()); }
}
PurchaseNavigationProvider.cs
public class PurchaseNavigationProvider : NavigationProvider
{
public override void SetNavigation(INavigationProviderContext context)
{
context.Manager.MainMenu
.AddItem(
new MenuItemDefinition(
"ppyTasks",
new LocalizableString("ppyTasks", PurchaseConsts.LocalizationSourceName),
url: "/Tasks",
icon: "fa fa-tasks"
)
);
}
}
SASWebModule.cs
[DependsOn(
typeof(AbpWebMvcModule),
typeof(SASDataModule),
typeof(SASApplicationModule),
typeof(SASWebApiModule),
typeof(AbpWebSignalRModule),
typeof(AbpHangfireModule), //AbpHangfireModule dependency can be removed if not using Hangfire
typeof(InventoryModule),
typeof(PurchaseModule))]
public class SASWebModule : AbpModule
{
public override void PreInitialize()
{
//Use database as language management
Configuration.Modules.Zero().LanguageManagement.EnableDbLocalization();
//Configuration.Localization.IsEnabled = false;
//Configure navigation/menu
Configuration.Navigation.Providers.Add<AppNavigationProvider>();
Configuration.Navigation.Providers.Add<FrontEndNavigationProvider>();
Configuration.Navigation.Providers.Add<MpaNavigationProvider>();
//Configuration.Navigation.Providers.Add<InventoryNavigationProvider>();
Configuration.Navigation.Providers.Add<PurchaseNavigationProvider>();
}
how can I achieve this? is it a good practice to have separate module?
sorry to ask many questions. how/where can I see "Notification List"? How can I send a specific notification to a user? How to test notification to myself?
How to turn off all languages except English.