1 Mar 20222 minutes to read

Localization library allows to localize the default text content of Dialog. In Dialog, The close button’s tooltip text alone will be localize based on culture.

Locale key en-US (default)
close close

Loading translations

To load translation object in an application use load function of L10n class.

In the below sample, French culture is set to Dialog and change the close button’s tooltip text.

<div id="container" style="height:400px;">
    @Html.EJS().Button("targetButton").Content("Ouvrir le dialogue").Render()
    @Html.EJS().Dialog("dialog").Header("Dialogue").Locale("fr-BE").Content("Dialogue avec la culture française").Target("#container").Width("250px").ShowCloseIcon(true).Render()

    window.onload = function () {
        document.getElementById('targetButton').onclick = function () {
            var dialog = document.getElementById("dialog").ej2_instances[0];
            'fr-BE': {
                'dialog': { 'close': "Fermer" }
public class HomeController : Controller
    public ActionResult Index()
        return View();

Output be like the below.