Open Closed

Extend SaasResource problem #7870 #8065


User avatar
0
sairam.thirupathuru created
  • 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.

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

7 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    sairam.thirupathuru created

    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.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Our implementation codes may be different. You can share a project to eliminate misunderstandings.

    Thanks

    liming.ma@volosoft.com

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    sairam.thirupathuru created

    We can't send code from official emails. It's straightforward, so there won't be any misunderstandings.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Hi

    Please share the SaasService.Contract csproj file content.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    sairam.thirupathuru created

    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
               );
            }
        }
    }
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can try adding <GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> to your SaasService.Contract csproj file.

    https://abp.io/docs/latest/framework/infrastructure/virtual-file-system#configure-the-abpvirtualfilesystemoptions

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.