protected virtual IStringLocalizer CreateLocalizer() { if (LocalizationResourceType != null) { return(StringLocalizerFactory.Create(LocalizationResourceType)); } var localizer = StringLocalizerFactory.CreateDefaultOrNull(); if (localizer == null) { throw new AbpException($"Set {nameof(LocalizationResourceType)} or define the default localization resource type (by configuring the {nameof(AbpLocalizationOptions)}.{nameof(AbpLocalizationOptions.DefaultResourceType)}) to be able to use the {nameof(L)} object!"); } return(localizer); }
public IStringLocalizer GetDefaultLocalizer() { return(StringLocalizerFactory.CreateDefaultOrNull()); }