From c1902d95dd3a1237bcd863170eebeeef52158c5e Mon Sep 17 00:00:00 2001 From: adrien Date: Sat, 8 Aug 2026 01:25:24 +0200 Subject: [PATCH] lang --- index.html | 58 +++++++++++++++++++++++++++--------------------------- js/app.js | 6 +++--- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/index.html b/index.html index c1dc580..871baaf 100644 --- a/index.html +++ b/index.html @@ -12,9 +12,7 @@ - - - + @@ -23,6 +21,8 @@ + + @@ -80,9 +80,7 @@
@@ -263,38 +263,38 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/js/app.js b/js/app.js index 0b4b7c4..2046346 100644 --- a/js/app.js +++ b/js/app.js @@ -276,14 +276,14 @@ function gameOver() { stats.show(); playSound(gameover) - speak("Game over") + speak("Game over", 'en-US') } -function speak(text) { +function speak(text, lang='fr-FR') { if (!window.speechSynthesis) return; const utterance = new SpeechSynthesisUtterance(text); - utterance.lang = 'fr-FR'; + utterance.lang = lang; utterance.volume = sfxVolumeRange.value; speechSynthesis.speak(utterance); }