From 0a43d945d7cbcdfa8660df2d2dfa58765671bbaa Mon Sep 17 00:00:00 2001 From: Jack Fistelmann Date: Wed, 10 Sep 2025 14:37:15 +0200 Subject: [PATCH] #18208 test deep nesting and add documentation --- docs/en/framework/fundamentals/localization.md | 14 ++++++++++++++ .../Volo/Abp/Localization/AbpLocalization_Tests.cs | 1 + .../Localization/TestResources/SourceExt/en.json | 5 ++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/en/framework/fundamentals/localization.md b/docs/en/framework/fundamentals/localization.md index 6e8a3f678a..d9d4290072 100644 --- a/docs/en/framework/fundamentals/localization.md +++ b/docs/en/framework/fundamentals/localization.md @@ -91,6 +91,20 @@ A JSON localization file content is shown below: > ABP will ignore (skip) the JSON file if the `culture` section is missing. +You may also use Nesting in your localization file + +````json +{ + "culture": "en", + "texts": { + "HelloWorld": "Hello World!", + "MyNestedTranslation": { + "SomeKey": "Some nested value" + } + } +} +```` + ### Default Resource `AbpLocalizationOptions.DefaultResourceType` can be set to a resource type, so it is used when the localization resource was not specified: diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs index 1c38754f4c..b827c9b8e6 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalization_Tests.cs @@ -386,6 +386,7 @@ public class AbpLocalization_Tests : AbpIntegratedTest