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


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

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