mirror of
https://gitee.com/LongbowEnterprise/BootstrapBlazor.git
synced 2024-12-06 05:59:45 +08:00
!3671 feat(#I67CM0): update LocalizationOptionsExtensions support multiple json culture file
* chore: bump version 7.1.9-beta01 * feat: 多语言 json 配置文件支持多个
This commit is contained in:
parent
d4f92c3d96
commit
3197b135e4
@ -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'">
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user