Перевод JS файлов

Подскажите пожалуйста как выполнить перевод строк на другой язык в JS файлах в приложений Laravel 7-8?

Пример кода:

$(".cancel").on('click',function(e) {
    e.preventDefault();
    var link = $(this).attr("href");
    
    Swal.fire({
        title: 'Are you sure?',
        text: "You won't be able to revert this!",
        icon: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#3085d6',
        cancelButtonColor: '#d33',
        confirmButtonText: 'Yes, Do It!'
    }).then((result) => {
        if (result.value == true) {
            window.location.href = link;
        }
    })
});

Пробивал стандартными {{ __('Are you sure?') }} - __('Are you sure?') методами постоянные ошибки. Подскажите пожалуйста еще один способ.


Ответы (0 шт):