diff --git a/erpnext/www/book_appointment/index.js b/erpnext/www/book_appointment/index.js
index 5562cbd..46ac155 100644
--- a/erpnext/www/book_appointment/index.js
+++ b/erpnext/www/book_appointment/index.js
@@ -69,7 +69,7 @@
     window.selected_timezone = timezone.value;
     update_time_slots(date_picker.value, timezone.value);
     let lead_text = document.getElementById('lead-text');
-    lead_text.innerHTML = "Select Time"
+    lead_text.innerHTML = __("Select Time")
 }
 
 async function get_time_slots(date, timezone) {
@@ -89,7 +89,7 @@
     clear_time_slots();
     if (window.slots.length <= 0) {
         let message_div = document.createElement('p');
-        message_div.innerHTML = "There are no slots available on this date";
+        message_div.innerHTML = __("There are no slots available on this date");
         timeslot_container.appendChild(message_div);
         return
     }
@@ -128,7 +128,7 @@
     let start_time_string = moment(time).tz(timezone).format("LT");
     let end_time = moment(time).tz(timezone).add(window.appointment_settings.appointment_duration, 'minutes');
     let end_time_string = end_time.format("LT");
-    return `<span style="font-size: 1.2em;">${start_time_string}</span><br><span class="text-muted small">to ${end_time_string}</span>`;
+    return `<span style="font-size: 1.2em;">${start_time_string}</span><br><span class="text-muted small">${__("to") } ${end_time_string}</span>`;
 }
 
 function select_time() {
@@ -227,9 +227,9 @@
         },
         callback: (response)=>{
             if (response.message.status == "Unverified") {
-                frappe.show_alert("Please check your email to confirm the appointment")
+                frappe.show_alert(__("Please check your email to confirm the appointment"))
             } else {
-                frappe.show_alert("Appointment Created Successfully");
+                frappe.show_alert(__("Appointment Created Successfully"));
             }
             setTimeout(()=>{
                 let redirect_url = "/";
@@ -239,7 +239,7 @@
                 window.location.href = redirect_url;},5000)
         },
         error: (err)=>{
-            frappe.show_alert("Something went wrong please try again");
+            frappe.show_alert(__("Something went wrong please try again"));
             button.disabled = false;
         }
     });
