> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemreference/functions/localization/currentlanguage.md).

# CurrentLanguage

{% hint style="info" %}
The current language active in the Runtime, as configured in the project settings and optionally changed/selected by the user, or the "Change language" process node, in the active session.

This function is SQL compatible. For more information about SQL compatibility, see our [documentation](/platform/wemreference/sql-compatibility.md).
{% endhint %}

{% hint style="success" %}
Returns the <mark style="color:green;">language</mark> which is currently active in the Runtime User session, based on the configuration in the Portal Settings.
{% endhint %}

{% hint style="info" %}
**Underscore or Hyphen**

The Language Code or Keyword is used with underscore and no doublequotes:\
\&#xNAN;**`nl_NL`** or **`en_US`**

The Language as a value, as displayed on a page or used as a text-parameter, uses a hyphen:\
"**nl-NL**" or "**en-US**" (doublequotes in expression as text) or nl-NL / en-US as plain values on page.

When a function or a process node expects a language value as input, it may in some cases accept the keyword (nl\_NL) and in other cases the ToString value ("nl-NL"). You can then choose to use the text literal (like "nl-NL") or use the ToString(language) function, like `ToString(CurrentLanguage)` or `ToString(nl_NL)`.
{% endhint %}

<details>

<summary><em><code>CurrentLanguage</code></em></summary>

`CurrentLanguage` \
:thumbsup:*Result:* `en_US` *(underscored keyword)* OR `en-US` *(hyphened when directly displayed on a page as a label)*

`ToString(CurrentLanguage)`\
:thumbsup:*Result:* en-US *(hyphened text value)*

*Comparisons, assuming the actual current language is* **`en_US`**

`CurrentLanguage = en_US`\
:thumbsup:*Result:* yes

`CurrentLanguage = nl_NL`\
:thumbsup:*Result:* no (because it is `en_US`)

`CurrentLanguage = "en-US"`\
:thumbsdown:warning: expression contains a type mismatch (keyword expected, string used)

`CurrentLanguage = nl_NL`\
:thumbsup:*Result:* no (because it is `en_US`)

`ToString(CurrentLanguage) = "en-US"`\
:thumbsup:*Result:* yes

`ToString(CurrentLanguage) = "not a language"`\
:thumbsup:*Result:* no

`ToString(CurrentLanguage) = ToString(en_US)`\
:thumbsup:*Result:* yes

`ToString(en_US) = "en-US"`\
:thumbsup:*Result:* yes

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wem.io/platform/wemreference/functions/localization/currentlanguage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
