- ABP Framework version: Latest Version
- Steps to reproduce the issue: I'm trying to extend "SaasResource " to the English language but the changes are not effecting in the application. Please help me out for resolving the issue.
Note : You don’t need the codebase for this. Just download the codebase from ABP.IO, open the SaaS Service, and try to add a new feature. Also, attempt to apply localization for the newly added feature.
7 Answer(s)
-
0
hi
Note : You don’t need the codebase for this. Just download the codebase from ABP.IO, open the SaaS Service, and try to add a new feature. Also, attempt to apply localization for the newly added feature.
Can you share this project via https://wetransfer.com/, I will change and share the code.
liming.ma@volosoft.com
Thanks.
-
0
Hello @maliming You don't need a code project for this. Download the SAAS service from ABP.IO, add a new feature, and implement localization for it.
-
0
Our implementation codes may be different. You can share a project to eliminate misunderstandings.
Thanks
liming.ma@volosoft.com
-
0
We can't send code from official emails. It's straightforward, so there won't be any misunderstandings.
-
0
Hi
Please share the SaasService.Contract csproj file content.
-
0
SaasService.Contract csproj
<Project Sdk="Microsoft.NET.Sdk"> <Import Project="..\common.props" /> <PropertyGroup> <TargetFramework>netstandard2.0</TargetFramework> <RootNamespace>CastandCrew.PSLWeb.SaasService</RootNamespace> <GenerateDocumentationFile>true</GenerateDocumentationFile> <CopyLocalLockFileAssemblies>True</CopyLocalLockFileAssemblies> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" /> <PackageReference Include="Volo.Abp.Features" Version="8.2.1" /> <PackageReference Include="Volo.Saas.Host.Application.Contracts" Version="8.2.1" /> <PackageReference Include="Volo.Saas.Tenant.Application.Contracts" Version="8.2.1" /> </ItemGroup> <ItemGroup> <PackageReference Include="Volo.Abp.UI" Version="8.2.1" /> <PackageReference Include="Volo.Abp.Validation" Version="8.2.1" /> <PackageReference Include="Volo.Abp.Authorization.Abstractions" Version="8.2.1" /> <PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="8.2.1" /> <PackageReference Include="Volo.Abp.Ddd.Domain.Shared" Version="8.2.1" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="Localization\SaasService\*.json" /> <Content Remove="Localization\SaasService\*.json" /> </ItemGroup> </Project>
SaasFeatureDefinitionProvider.cs
using CastandCrew.PSLWeb.SaasService.Localization; using Volo.Abp.Features; using Volo.Abp.Localization; using Volo.Abp.Validation.StringValues; namespace CastandCrew.PSLWeb.SaasService.Features { public class SaasFeatureDefinitionProvider : FeatureDefinitionProvider { private static LocalizableString L(string name) { return LocalizableString.Create<SaasServiceResource>(name); } private static LocalizableStringInfo CreateLocalizableStringInfo(string name) { // Assuming you need the name and a string for localization return new LocalizableStringInfo("SaasService", name); // Adjust based on actual constructor } public override void Define(IFeatureDefinitionContext context) { var vendorFeatureGroup = context.AddGroup("SaasFeatureApp", L("SaasFeatureApp")); vendorFeatureGroup.AddFeature( "SaasFeatureApp.IsLegacyFeature", defaultValue: "false", displayName: L("IsLegacyFeature"), description: L("IsLegacyFeatureDescription"), valueType: new ToggleStringValueType(), true, true ); vendorFeatureGroup.AddFeature( "SaasFeatureApp.ProjectType", defaultValue: "Commercial", // Set the default value here displayName: L("ProjectType"), description: L("ProjectTypeDescription"), valueType: new SelectionStringValueType() { ItemSource = new StaticSelectionStringValueItemSource( new LocalizableSelectionStringValueItem() { Value = "Commercial", DisplayText = CreateLocalizableStringInfo("Commercial") }, new LocalizableSelectionStringValueItem() { Value = "Features", DisplayText = CreateLocalizableStringInfo("Features") }, new LocalizableSelectionStringValueItem() { Value = "Television", DisplayText = CreateLocalizableStringInfo("Television") }, new LocalizableSelectionStringValueItem() { Value = "LiveOrEvents", DisplayText = CreateLocalizableStringInfo("LiveOrEvents") }), }, true, true ); } } }
-
0
hi
You can try adding
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
to yourSaasService.Contract csproj
file.https://abp.io/docs/latest/framework/infrastructure/virtual-file-system#configure-the-abpvirtualfilesystemoptions