Hello Explain to me how to make a site bilingual | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

Hello Explain to me how to make a site bilingual

Hello Explain to me how to make a site bilingual or multilingual, the codes used by someone

28th Apr 2022, 12:37 PM
arminjahani
arminjahani - avatar
1 Respuesta
+ 2
What you'd want to do is have both versions of all text ready on hand, then you prepare an element that lets you toggle between both variations of text. Let "A" be the default language and "B" be the other language. Set a language variable to "A" Then, once that element is triggered, you change that variable to "B" and replace every element with the appropriate text of "B" that corresponds to them.
28th Apr 2022, 12:48 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar