---
id: object/codeunit/43
type: object
title: Codeunit 43 "Language"
summary: Codeunit 43 "Language" in System Application (System.Globalization). 26 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24, BC26-28.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "28"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 472ddbcb8d16fdfd0cfb1f3444cac1bc0e8a0362134eb0795b06b417f64e38b3
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Language/src/Language.Codeunit.al
    title: src/System Application/App/Language/src/Language.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 43
name: Language
namespace: System.Globalization
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "27"
  - "28"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 28
  events: 2
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 1
  calls: 1
  called_by: 74
  implements: 0
---

# Codeunit 43 "Language"

> Codeunit 43 "Language" in System Application (System.Globalization). 26 public procedures, 2 events. Present since at least BC23, still in BC30, changed in BC24, BC26-28.

System Application · System.Globalization · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Language/src/Language.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |
| SingleInstance | true |

## Events published

- `OnGetUserLanguageCode(var UserLanguageCode: Code[10]; var Handled: Boolean)` (integration): Integration event, emitted from . Subscribe to this event to change the default behavior by changing the provided parameter(s).
- `OnGetLanguageIdOrDefault(var DefaultLanguageCode: Code[10])` (integration): Integration event, emitted from . Subscribe to this event to change the default behavior by changing the provided parameter(s).
  - subscribers: [Codeunit 1306 "Company Information Mgt."](../codeunit/1306.md) OnGetLanguageIdOrDefault

## Procedures

- `GetUserLanguageCode(): Code[10]`: Gets the current user's language code. The function emits the event. To change the language code returned from this function, subscribe for this event and change the passed language code.
- `GetUserLanguageTag(): Text[80]`: Gets the current user's language tag.
- `GetLanguageIdOrDefault(LanguageCode: Code[10]): Integer`: Gets the language ID based on its code. Or defaults to the current user language.
- `GetFormatRegionOrDefault(FormatRegion: Text[80]): Text[80]`: Returns format region for a given language. If format region is provided it itself will be returned. If format region is empty the region is taken from UserSessionSettings. If no valid tag is found, the default 'en-US' tag is returned.
- `GetLanguageId(LanguageCode: Code[10]): Integer`: Gets the language ID based on its code.
- `SetOverrideLanguageId(LanguageId: Integer)`: Overrides the language ID returned by the GetLanguageIdOrDefault function.
- `SetOverrideLanguageId(LanguageId: Integer; ResetOverride: Boolean)`: Overrides the language ID returned by the GetLanguageIdOrDefault function.
- `SetOverrideFormatRegion(FormatRegion: Text[80])`: Overrides the format region returned by the GetFormatRegionOrDefault function.
- `SetOverrideFormatRegion(FormatRegion: Text[80]; ResetOverride: Boolean)`: Overrides the format region returned by the GetFormatRegionOrDefault function.
- `GetLanguageCode(LanguageId: Integer): Code[10]`: Gets the code for a language based on its ID.
- `GetWindowsLanguageName(LanguageCode: Code[10]): Text`: Gets the name of a language based on the language code.
- `GetWindowsLanguageName(LanguageId: Integer): Text`: Gets the name of a windows language based on its ID.
- `GetApplicationLanguages(var TempLanguage: Record "Windows Language" temporary)`: Gets all available languages in the application.
- `GetDefaultApplicationLanguageId(): Integer`: Gets the default application language ID.
- `ToDefaultLanguage(ValueVariant: Variant): Text`: Formats the provided value in default language.
- `ValidateApplicationLanguageId(LanguageId: Integer)`: Checks whether the provided language is a valid application language. If it isn't, the function displays an error.
- `ValidateWindowsLanguageId(LanguageId: Integer)`: Checks whether the provided language exists. If it doesn't, the function displays an error.
- `LookupApplicationLanguageId(var LanguageId: Integer)`: Opens a list of the languages that are available for the application so that the user can choose a language.
- `LookupWindowsLanguageId(var LanguageId: Integer)`: Opens a list of languages that are available for the Windows version.
- `LookupLanguageCode(var LanguageCode: Code[10])`: Opens a list of the languages that are available for the application so that the user can choose a language.
- `GetParentLanguageId(LanguageId: Integer): Integer`: Gets the parent language ID based on Windows Culture Info.
- `SetPreferredLanguageID(UserSecID: Guid; NewLanguageID: Integer)`: Sets the preferred language for the provided user.
- `GetTwoLetterISOLanguageName(LanguageID: Integer): Text[2]`: Retrieves the two-letter ISO language name for the specified language ID.
- `GetLanguageIdFromCultureName(CultureName: Text): Integer`: Retrieves the language ID for the specified culture name.
- `GetCultureName(LanguageID: Integer): Text`: Retrieves the culture name for the specified language ID.
- `GetCurrentCultureName(): Text`: Retrieves the current culture name for the session.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 54 "Language Impl."](../codeunit/54.md) (21 calls: `GetApplicationLanguages → GetApplicationLanguages`, `GetCultureName → GetCultureName`, `GetCurrentCultureName → GetCurrentCultureName`, …)

## Called by

- [Codeunit 1890 "Reminder Communication"](../codeunit/1890.md) (6 calls: `GetCustomerLanguageOrDefaultUserLanguage → GetDefaultApplicationLanguageId`, `GetCustomerLanguageOrDefaultUserLanguage → GetLanguageCode`, `GetCustomerLanguageOrDefaultUserLanguage → GetUserLanguageCode`, …)
- [Codeunit 7774 "Copilot Capability Impl"](../codeunit/7774.md) (5 calls: `AddStatusAndBillingTypeTelemetryDimension → GetDefaultApplicationLanguageId`, `AddTelemetryCustomDimensions → GetDefaultApplicationLanguageId`, `AddTelemetryDimensions → GetDefaultApplicationLanguageId`, …)
- [Codeunit 9180 "Generic Chart Mgt"](../codeunit/9180.md) (5 calls: `BuildCaptionBuf → GetLanguageCode`, `BuildMemoBuf → GetLanguageCode`, `BuildMemoMultilanguageText → GetLanguageId`, …)
- [Codeunit 2515 "AppSource Product Manager"](../codeunit/2515.md) (4 calls: `GetCurrentLanguageCultureName → GetCultureName`, `GetCurrentUserLanguageAndLocaleID → GetLanguageIdFromCultureName`, `GetCurrentUserLanguageID → GetLanguageIdFromCultureName`, …)
- [Codeunit 4325 "Agent Setup Impl."](../codeunit/4325.md) (3 calls: `AppendAgentSummary → GetWindowsLanguageName`, `OpenLanguageAndRegionPage → GetWindowsLanguageName`, `UpdateFields → GetWindowsLanguageName`)
- [Codeunit 4615 "MailKit Client"](../codeunit/4615.md) (3 calls: `Authenticate → ToDefaultLanguage`, `Connect → ToDefaultLanguage`, `Send → ToDefaultLanguage`)
- [Codeunit 53 "Translation Helper"](../codeunit/53.md) (3 calls: `GetTranslatedFieldCaption → GetLanguageIdOrDefault`, `SetGlobalLanguageByCode → GetLanguageId`, `SetGlobalLanguageToDefault → GetDefaultApplicationLanguageId`)
- [Codeunit 8712 "Telemetry Impl."](../codeunit/8712.md) (3 calls: `AddCommonCustomDimensions → GetDefaultApplicationLanguageId`, `AddCommonCustomDimensions → ToDefaultLanguage`, `AddCustomDimensionsFromSubscribers → GetDefaultApplicationLanguageId`)
- [Codeunit 1814 "Assisted Setup Subscribers"](../codeunit/1814.md) (2 calls: `Initialize → GetDefaultApplicationLanguageId`, `InitializeCustomize → GetDefaultApplicationLanguageId`)
- [Codeunit 1996 "Checklist Banner Impl."](../codeunit/1996.md) (2 calls: `GetChecklistItemStatusDimensionsInDefaultLanguage → GetDefaultApplicationLanguageId`, `GetUserChecklistStatusDimensionsInDefaultLanguage → GetDefaultApplicationLanguageId`)
- [Codeunit 4302 "SOA Validation Function"](../codeunit/4302.md) (2 calls: `GetAgentLanguage → GetLanguageId`, `GetAgentLanguage → GetUserLanguageCode`)
- [Codeunit 4356 "Custom Agent Import"](../codeunit/4356.md) (2 calls: `ValidateAgentLanguage → GetWindowsLanguageName`, `ValidateAgentLocale → GetWindowsLanguageName`)
- [Codeunit 4400 "SOA Setup"](../codeunit/4400.md) (2 calls: `GetAgentTaskPageContext → GetLanguageId`, `LogTelemetry → GetCultureName`)
- [Codeunit 4598 "SOA Instructions"](../codeunit/4598.md) (2 calls: `AddCultureToBroaderItemSearchSystemPrompt → GetCultureName`, `AddCultureToBroaderItemSearchSystemPrompt → GetLanguageId`)
- [Codeunit 46927 "BC14 Reminder Text Migrator"](../codeunit/46927.md) (2 calls: `MigrateReminderAttachmentText → GetDefaultApplicationLanguageId`, `MigrateReminderAttachmentText → GetLanguageCode`)
- [Codeunit 54 "Language Impl."](../codeunit/54.md) (2 calls: `GetLanguageIdOrDefault → OnGetLanguageIdOrDefault`, `GetUserLanguageCode → OnGetUserLanguageCode`)
- [Codeunit 7201 "CDS Integration Impl."](../codeunit/7201.md) (2 calls: `GetVirtualTablesAppSourceLink → GetCultureName`, `RegisterAssistedSetup → GetDefaultApplicationLanguageId`)
- [Codeunit 9011 "Azure AD Graph User Impl."](../codeunit/9011.md) (2 calls: `GetPreferredLanguageID → GetLanguageId`, `SetUserLanguage → SetPreferredLanguageID`)
- [Report 1304 "Standard Sales - Quote"](../report/1304.md) (2 calls: `SetFormatRegion → GetFormatRegionOrDefault`, `SetLanguage → GetLanguageIdOrDefault`)
- [Table 472 "Job Queue Entry"](../table/472.md) (2 calls: `SetDefaultValues → GetLanguageIdOrDefault`, `SetDefaultValues → GetUserLanguageCode`)
- [Table 9 "Country/Region"](../table/9.md) (2 calls: `GetNameInCurrentLanguage → GetUserLanguageCode`, `GetTranslatedName → GetLanguageCode`)
- [Codeunit 10 "Type Helper"](../codeunit/10.md) (1 call: `FormatDateWithCurrentCulture → GetUserLanguageTag`)
- [Codeunit 1180 "Data Privacy Mgmt"](../codeunit/1180.md) (1 call: `CreateConfigPackage → GetDefaultApplicationLanguageId`)
- [Codeunit 1392 "Monitor Sensitive Field"](../codeunit/1392.md) (1 call: `AddMonitorFieldSetupWizard → GetDefaultApplicationLanguageId`)
- [Codeunit 1485 "Rolecenter Selector Mgt."](../codeunit/1485.md) (1 call: `GetLanguageSpecificText → GetLanguageCode`)
- [Codeunit 1681 "Email Logging Management"](../codeunit/1681.md) (1 call: `RegisterAssistedSetup → GetDefaultApplicationLanguageId`)
- [Codeunit 1797 "Data Migration Facade Helper"](../codeunit/1797.md) (1 call: `SearchLanguage → GetLanguageCode`)
- [Codeunit 1800 "Assisted Company Setup"](../codeunit/1800.md) (1 call: `AddAssistedCompanySetup → GetDefaultApplicationLanguageId`)
- [Codeunit 1806 "Excel Data Migrator"](../codeunit/1806.md) (1 call: `CreatePackageMetadata → GetDefaultApplicationLanguageId`)
- [Codeunit 1878 "Guided Experience Subscribers"](../codeunit/1878.md) (1 call: `OnRegisterGuidedExperienceItem → GetDefaultApplicationLanguageId`)
- [Codeunit 1991 "Guided Experience Impl."](../codeunit/1991.md) (1 call: `AddGuidedExperienceItemDimensions → GetDefaultApplicationLanguageId`)
- [Codeunit 2011 "Entity Text AOAI Settings"](../codeunit/2011.md) (1 call: `GetLanguageName → GetWindowsLanguageName`)
- [Codeunit 20117 "AMC Bank Assisted Mgt."](../codeunit/20117.md) (1 call: `InsertIntoAssistedSetup → GetDefaultApplicationLanguageId`)
- [Codeunit 2027 "Image Analyzer Ext. Mgt."](../codeunit/2027.md) (1 call: `InsertIntoAssistedSetup → GetDefaultApplicationLanguageId`)
- [Codeunit 20366 "Tax Engine Assisted Setup"](../codeunit/20366.md) (1 call: `Initialize → GetDefaultApplicationLanguageId`)
- [Codeunit 2518 "AppSrc Product Deps. Provider"](../codeunit/2518.md) (1 call: `GetFormatRegionOrDefault → GetFormatRegionOrDefault`)
- [Codeunit 392 "Reminder-Make"](../codeunit/392.md) (1 call: `GetOpenEntriesNotDueOnHoldTranslated → GetLanguageIdOrDefault`)
- [Codeunit 40 "LogInManagement"](../codeunit/40.md) (1 call: `LogInStart → GetDefaultApplicationLanguageId`)
- [Codeunit 4701 "VAT Group Helper Functions"](../codeunit/4701.md) (1 call: `AddVATReportSetupWizard → GetDefaultApplicationLanguageId`)
- [Codeunit 5193 "Contoso Demo Tool"](../codeunit/5193.md) (1 call: `CheckLanguageBeforeGeneratingDemoData → GetWindowsLanguageName`)
- [Codeunit 534 "IC Read Notification JR"](../codeunit/534.md) (1 call: `ReadNotification → GetDefaultApplicationLanguageId`)
- [Codeunit 561 "IC Data Exchange API"](../codeunit/561.md) (1 call: `ExtractCurrentUserAndChangeToEnglish → GetDefaultApplicationLanguageId`)
- [Codeunit 5685 "Create Media Repository"](../codeunit/5685.md) (1 call: `InsertSalesDocumentIcon → GetDefaultApplicationLanguageId`)
- [Codeunit 6613 "FS Assisted Setup Subscriber"](../codeunit/6613.md) (1 call: `RegisterAssistedSetup → GetDefaultApplicationLanguageId`)
- [Codeunit 6710 "ODataUtility"](../codeunit/6710.md) (1 call: `GenerateExcelTemplateWorkBook → GetCultureName`)
- [Codeunit 8704 "Feature Telemetry Impl."](../codeunit/8704.md) (1 call: `LogUptake → GetDefaultApplicationLanguageId`)
- [Codeunit 8900 "Email Impl"](../codeunit/8900.md) (1 call: `GetTelemetryDimensions → GetDefaultApplicationLanguageId`)
- [Codeunit 9029 "Azure AD User Sync Impl."](../codeunit/9029.md) (1 call: `ApplyUpdateFromAzureGraph → SetPreferredLanguageID`)
- [Codeunit 9034 "Azure AD User Subscribers"](../codeunit/9034.md) (1 call: `OnAddCommonCustomDimensions → ToDefaultLanguage`)
- [Codeunit 9561 "Document Sharing Impl."](../codeunit/9561.md) (1 call: `PerformRecordIntent → ToDefaultLanguage`)
- and 24 more: data/code/graph/29/calls.json

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24, BC26-28

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Language")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
