!3671 feat(#I67CM0): update LocalizationOptionsExtensions support multiple json culture file

* chore: bump version 7.1.9-beta01
* feat: 多语言 json 配置文件支持多个
This commit is contained in:
Argo 2022-12-25 04:14:38 +00:00
parent d4f92c3d96
commit 3197b135e4
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Version>7.1.8</Version>
<Version>7.1.9-beta01</Version>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">

View File

@ -38,12 +38,12 @@ internal static class LocalizationOptionsExtensions
// 获得配置外置资源文件
if (option.AdditionalJsonFiles != null)
{
var file = option.AdditionalJsonFiles.FirstOrDefault(f =>
var files = option.AdditionalJsonFiles.Where(f =>
{
var fileName = Path.GetFileNameWithoutExtension(f);
return fileName.Equals(cultureName, StringComparison.OrdinalIgnoreCase);
});
if (!string.IsNullOrEmpty(file))
foreach (var file in files)
{
builder.AddJsonFile(file, true, true);
}