Open Closed

Using IStringLocalizer in Domain project #2257


User avatar
0
korolei created
  • ABP Framework version: v4.4.2
  • UI type: Blazor
  • DB provider: EF Core

Hi guys,

is it possible to use IStringLocalizer in DataSeedContributor, so I could convert LocalizableString into actual string from localization resource? I'm using following method to get value, but StringLocalized doesn't have any items to get value: private string DeLocalize(LocalizableString localizedString) { var l = _localizerFactory.Create(localizedString.ResourceType); return l[localizedString.Name]; }

    Thanks

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

    hi

    Can you share the full code of your DataSeedContributor

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Its looks good.

    Can you send me a project that I can debug? liming.ma@volosoft.com

    You can create a new project via CLI

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.0.0-preview. Updated on June 23, 2025, 11:58