I Created Multi Language Website In 20 Minutes

I Created Multi Language Website In 20 Minutes

Senaid Bacinovic

1 год назад

22,666 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Senaid Bacinovic
Senaid Bacinovic - 14.09.2022 16:35

DID YOU GET MASSIVE VALUE FROM TODAY'S VIDEO?! IF YES: 🔥
1. SMASH that LIKE & SUBSCRIBE button! 👊
2. COMMENT below what you learned or what tutorials you want to see next ✍

Ответить
The Chosen
The Chosen - 15.06.2023 12:32

Good job bro, JESUS IS COMING BACK VERY SOON;WATCH AND PREPARE

Ответить
i ate tacos for breakfast
i ate tacos for breakfast - 31.05.2023 17:24

Are you Bosnian? That's so--on point, I'm making a love-letter / website for my wife who has lived in Bosnia all her life, making it multi-lingual is pretty important to me

Ответить
NamCloud Investments
NamCloud Investments - 01.12.2022 02:13

There no way yo integrate Google Translate into a website

Ответить
Mahdi Al-Naimi
Mahdi Al-Naimi - 20.11.2022 14:11

what should I do if all my website data from data base directly. how can I translate it?

Ответить
Envad D.
Envad D. - 19.09.2022 06:43

Too zemo, kralj si. Ovo mi je trebalo :) Awesome as always!

Ответить
Wiktor Liszkiewicz
Wiktor Liszkiewicz - 15.09.2022 04:20

I would consider of using another approach. When instead associative array you would use a function like t("manu_support", "Support"), which will resolve to default "English" text out of the box unless a translation was provided & requested. This way for English you would not even have to touch the database.

To make this easier, you could then build a basic tool which would register all functions, scan all PHP files in a project and run (simple regex on each files) that would then register all phases in to database (if not exists). So you don't need to manually register them, and all you would have to do is to translate.

Ответить
Jaromír Hodan
Jaromír Hodan - 14.09.2022 18:21

Well... This is good for a small websites, but it'll get super hard to do it on larger projects. So I would probably use something like Deepl API and then display the translation using js.
And if you want to use your translation I would also use js to get your translated strings in JSON and then apply them to the frontend, so you don't need to change every string manually in the backend code, and you could also make a cookie to remember the selected language.
But as an example, your video is good enough!

Ответить
Adolf Ezeribe
Adolf Ezeribe - 14.09.2022 18:21

Also, Senaid, it is not too difficult to translate from English to Bosnian, because you speak Bosnian also. What if you need to translate into say, 5 other languages, what's the best way to translate each part of your pages before entry to the database?

Ответить
Adnan Tachnical Boy
Adnan Tachnical Boy - 14.09.2022 17:02

Best video

Ответить