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

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38