public JsonStringLocalizerFactory(IHostingEnvironment hostingEnvironment, IOptions <LocalizationOptions> localizationOptions) { if (localizationOptions == null) { throw new ArgumentNullException(nameof(localizationOptions)); } this._hostingEnvironment = hostingEnvironment ?? throw new ArgumentNullException(nameof(hostingEnvironment)); this._options = localizationOptions.Value; this._applicationName = hostingEnvironment.ApplicationName; }
//public JsonStringLocalizer(IHostingEnvironment hostingEnvironment, LocalizationOptions options, string baseResourceName) //{ // _options = options; // _hostingEnvironment = hostingEnvironment; // _cultureInfo = CultureInfo.CurrentCulture; // _baseResourceName = baseResourceName + "." + _cultureInfo.Name; // _all = GetAll(); //} public JsonStringLocalizer(IHostingEnvironment hostingEnvironment, LocalizationOptions options, string baseResourceName, CultureInfo culture) //: this(hostingEnvironment, options, baseResourceName) { _options = options; _hostingEnvironment = hostingEnvironment; _cultureInfo = culture ?? CultureInfo.CurrentUICulture; _baseResourceName = baseResourceName + "." + _cultureInfo.Name; _all = GetAll(); }