Open Closed

Can't set culture / language by using Accept-Language header #2320


User avatar
0
alex@livemobility.com created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v4.4.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • I'm using ABP commercial.

Hello Abp Team,

I need guidance in setting the culture of a request. From my understanding, abp implements the funcionality from https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-6.0, but if I try to use Accept-Language header, or any of the proposed language selector, I still get the default language configured in the project which is en-US. I'm trying to setup nl ( Dutch ). Our project was provisioned by using the starter template

We have created both a new json for the language and also added the language by using the language management module

Please let me know what other information I can provide

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

1 Answer(s)
  • User Avatar
    0
    cotur created

    Hi,

    I successfully set culture by using Accept-Language header and get response with defined culture.

    Note: When ABP could not find the given culture files, it roll-backs to default culture and responses with default culture.

    Please make sure you've successfully added new language to your application.

    https://docs.abp.io/en/abp/latest/Localization

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
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.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.