diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-20 21:32:38 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-20 21:32:38 +0800 |
commit | 38cef20cd509648d50e289cd4c7ec4a772031b12 (patch) | |
tree | c50aff4b98c2582a216a57268bcf3cfa67ff03ae /Timeline/Helpers/StringLocalizerFactoryExtensions.cs | |
parent | e70569bfb951ea4cc67083d1596157a779256922 (diff) | |
download | timeline-38cef20cd509648d50e289cd4c7ec4a772031b12.tar.gz timeline-38cef20cd509648d50e289cd4c7ec4a772031b12.tar.bz2 timeline-38cef20cd509648d50e289cd4c7ec4a772031b12.zip |
...
Diffstat (limited to 'Timeline/Helpers/StringLocalizerFactoryExtensions.cs')
-rw-r--r-- | Timeline/Helpers/StringLocalizerFactoryExtensions.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Timeline/Helpers/StringLocalizerFactoryExtensions.cs b/Timeline/Helpers/StringLocalizerFactoryExtensions.cs new file mode 100644 index 00000000..3cb561f5 --- /dev/null +++ b/Timeline/Helpers/StringLocalizerFactoryExtensions.cs @@ -0,0 +1,14 @@ +
+using Microsoft.Extensions.Localization;
+using System.Reflection;
+
+namespace Timeline.Helpers
+{
+ internal static class StringLocalizerFactoryExtensions
+ {
+ internal static IStringLocalizer Create(this IStringLocalizerFactory factory, string basename)
+ {
+ return factory.Create(basename, new AssemblyName(typeof(StringLocalizerFactoryExtensions).Assembly.FullName!).Name);
+ }
+ }
+}
\ No newline at end of file |