> 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/plugins/core-plugins/instance-methods/usdtranslate.md).

# $translate

## Introduction

`$translate(string stringId, Object args = {}) : string`

The **$translate** instance method provides access to translations from the [internationalization](https://docs.elentra.org/ejs/~/drafts/-LL0LF9_5TXTovxQ4e-Q/primary/v/1.2/guide/internationalization) library. It accepts the identifier for a [string resource](https://docs.elentra.org/ejs/~/drafts/-LL0LF9_5TXTovxQ4e-Q/primary/v/1.2/guide/internationalization/escl/concepts/string-resources) and an object containing key-value pairs representing variables to replace in the processed string.

The translations are performed based on the currently set [active locale](https://docs.elentra.org/ejs/~/drafts/-LL0LF9_5TXTovxQ4e-Q/primary/v/1.2/guide/internationalization/locales#active-locale).
