File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -269,10 +269,18 @@ export class AbpHttp extends Http {
269269 }
270270
271271 this . addAuthorizationHeaders ( options ) ;
272+ this . addAspNetCoreCultureHeader ( options ) ;
272273 this . addAcceptLanguageHeader ( options ) ;
273274 this . addTenantIdHeader ( options ) ;
274275 }
275276
277+ protected addAspNetCoreCultureHeader ( options : RequestOptionsArgs ) {
278+ let cookieLangValue = this . _utilsService . getCookieValue ( "Abp.Localization.CultureName" ) ;
279+ if ( cookieLangValue && options . headers && ! options . headers . has ( '.AspNetCore.Culture' ) ) {
280+ options . headers . append ( '.AspNetCore.Culture' , cookieLangValue ) ;
281+ }
282+ }
283+
276284 protected addAcceptLanguageHeader ( options : RequestOptionsArgs ) {
277285 let cookieLangValue = this . _utilsService . getCookieValue ( "Abp.Localization.CultureName" ) ;
278286 if ( cookieLangValue && options . headers && ! options . headers . has ( 'Accept-Language' ) ) {
You can’t perform that action at this time.
0 commit comments