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!

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