Open Closed

Get IStringLocalizer's value without Tenant #4490


User avatar
0
LarryLin created

I want to get localzation value from IStringLocalizer. I want to get localzation value without tenant. I use disable IMultiTenant,but it doesn't work. (My localzation values are in the AbpLanguageTexts' table.)

  • ABP Framework version: 7.0.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

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

    Hi,

    You can try :

    using (CurrentTenant.Change(null))
    {
        return L[name];
    }
    
  • User Avatar
    0
    LarryLin created

    Thank you so much!

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 20, 2025, 11:20