From 93da9c588b16b9e72334a61ab7259809a1895579 Mon Sep 17 00:00:00 2001 From: tijevlam Date: Fri, 25 Nov 2022 10:01:40 +0100 Subject: [PATCH] English Translation - Because iI like this setup to easily practice basic regex I wanted to make it available for my non-spanish speaking teammates. And thus, I included an English translation for all game related parts. On a level basis this would be easily extended to other languages too. For the UI-texts, the setup isnt ideal for multi-languages. It might need a seperate i18n setup. - The language selector is available in the footer. This could be a selector with flags in the future. - The chosen language is stored in localStorage to return in its same state when you return later. --- src/index.html | 5 +++- src/js/Game.ts | 31 ++++++++++++++++---- src/js/Level.ts | 7 +++-- src/js/index.ts | 75 +++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 94 insertions(+), 24 deletions(-) diff --git a/src/index.html b/src/index.html index 3d8ace7..8de55b4 100644 --- a/src/index.html +++ b/src/index.html @@ -14,10 +14,13 @@

<input pattern=""> - +