0
nguyenngoc.son created
- ABP Framework version: v7.2.2
- UI type: Angular
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes
- Exception message and stack trace: From service A, we're sending one message to service B via RabbitMQ, however when service B proceed the message, it using default localizaion instead of language that currently use by user.
- Steps to reproduce the issue:"
1 Answer(s)
-
0
Hi,
You can try:
public abstract class EventDataWithCultureName { public class CultureName {get; set;} } public class MyEventData: EventDataWithCultureName { ...... } await _distributedEventBus.PublishAsync( new MyEventData { CultureName = CultureInfo.CurrentCulture.Name } ); public class MyHandler: IDistributedEventHandler<MyEventData>, ITransientDependency { public async Task HandleEventAsync(MyEventData eventData) { using (CultureHelper.Use(CultureInfo.GetCultureInfo(eventData.CultureName))) { .... } } }