Set language on web services

Hi experts,

This is regarding Business Central cloud.

When our users use Business Central, everything is in Danish due to the personal user setup.

We have a specifik "user" that is used to connect from a C# program using web services. That user does also have the "da-DK" (Danish) language set on the personal user setup in Business Central.

The problem is that when a web service return an error message, it is in English.

How can we set that to Danish?

(It is a small customer and everything should be in Danish for all users.)

Hope someone can help.

Best Answers

  • MrBeck
    MrBeck Member Posts: 1
    edited 2025-08-06 Answer ✓
    You can set it with
    GlobalLanguage(LanguageID)

    We are using ODATA and we send the language code within the JSON-File. In our case DEU. This language code is extracted if found. With the code you can determine the LanguageID in table Windows Language and set it with GlobaLanguage. With this we set the language on runtime. I don't know if it is possible to set the language for web services globally.
  • RockWithNAV
    RockWithNAV Member Posts: 1,172
    Answer ✓
    GlobalLanguage should work possibly. I had a similar requirement of running a Report in 4 different languages over same NAV localization and that worked like a charm for me.

Answers

  • MrBeck
    MrBeck Member Posts: 1
    edited 2025-08-06 Answer ✓
    You can set it with
    GlobalLanguage(LanguageID)

    We are using ODATA and we send the language code within the JSON-File. In our case DEU. This language code is extracted if found. With the code you can determine the LanguageID in table Windows Language and set it with GlobaLanguage. With this we set the language on runtime. I don't know if it is possible to set the language for web services globally.
  • RockWithNAV
    RockWithNAV Member Posts: 1,172
    Answer ✓
    GlobalLanguage should work possibly. I had a similar requirement of running a Report in 4 different languages over same NAV localization and that worked like a charm for me.
  • MortenSteengaard
    MortenSteengaard Member Posts: 144
    Thank you, MrBeck and RockWithNAV.