# Literals (Preview)

{% hint style="danger" %}

## **Experimental Feature**

Support for literal syntax within ESCL is currently experimental.  This means that the functionality hasn't been thoroughly tested and may not behave as expected.

This functionality may change or be *removed entirely* in the future.

**Do not use experimental features in production code.**
{% endhint %}

## Introduction

An experimental feature, **literals** allow you to hard-code values directly into [clauses](https://docs.elentra.org/ejs/1.2/guide/internationalization/escl/concepts/clauses).  By default, ESCL only supports referencing existing, pre-defined [strings](https://docs.elentra.org/ejs/1.2/guide/internationalization/escl/concepts/string-resources).  However, sometimes it may be useful to just include a string directly.

## String literals

A **string literal** is a [string](https://docs.elentra.org/ejs/1.2/guide/internationalization/escl/concepts/string-resources) that is defined directly inside of a [clause](https://docs.elentra.org/ejs/1.2/guide/internationalization/escl/concepts/clauses).  As such, it does not have an identifier and cannot be referenced by other strings.

A string literal can be any string of characters, wrapped in single- or double-quotes.

In this example, the string literal `"login"` is passed to the [LINK](https://docs.elentra.org/ejs/1.2/guide/internationalization/escl/functions/link) [function](https://docs.elentra.org/ejs/1.2/guide/internationalization/escl/concepts/functions):

```javascript
hello_message: `Hello!  Please { LINK("login", :linkUrl) } to continue.`
```

Then, we translate the string, passing in the variable values:

{% tabs %}
{% tab title="$translate" %}
{% code title="" %}

```javascript
$translate('hello_message', {
    linkUrl: 'profile.php'
});
```

{% endcode %}

The result:

```markup
Hello!  Please <a href="profile.php">login</a> to continue.
```

{% endtab %}

{% tab title="v-i18n" %}
{% code title="" %}

```markup
<p v-i18n="{ linkUrl: 'profile.php' }">hello_message</p>
```

{% endcode %}

The result:

```markup
<p>Hello! Please <a href="profile.php">login</a> to continue.</p>
```

{% endtab %}
{% endtabs %}
