Starts in:
1 DAY
22 HRS
38 MIN
10 SEC
Starts in:
1 D
22 H
38 M
10 S
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 November 20, 2024, 13:06