> For the complete documentation index, see [llms.txt](https://docs.elentra.org/ejs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elentra.org/ejs/1.3/guide/internationalization/escl/concepts/variables.md).

# Variables

## Introduction

A **variable** is a part of a string that will be replaced by values provided by the application.  Values may be passed using the [$translate](/ejs/1.3/guide/plugins/core-plugins/instance-methods/usdtranslate.md) instance method or the [v-i18n directive](/ejs/1.3/guide/plugins/core-plugins/directives/v-i18n-directive.md).

{% hint style="info" %}

#### Naming Convention

Variable names must be camel-cased, alphanumeric, and begin with a letter (e.g. `:myVariable`).  The colon character (`:`) indicates the beginning of a variable in the clause definition, but must not be included when passing the argument values.
{% endhint %}

## Working with variables

In this example, the application is expected to provide values for the `firstName` and `lastName` variables as arguments to the [$translate](/ejs/1.3/guide/plugins/core-plugins/instance-methods/usdtranslate.md) method or the [v-i18n directive](/ejs/1.3/guide/plugins/core-plugins/directives/v-i18n-directive.md).

```javascript
welcome_message: `Hello, { :firstName :lastName }, and welcome!`
```

```javascript
this.$translate('welcome_message', { firstName: 'John', lastName: 'Doe' });
// Hello, John Doe, and welcome!
```

```markup
<div v-i18n="{ firstName: 'John', lastName: 'Doe' }">welcome_message</div>
<!-- <div>Hello, John Doe, and welcome!</div> -->
```
