Category: javascript

you will learn how to create multi-language website in PHP first I’m going to explain about three different ways on how you can do it And then show you step-by-step how to write the code and use the easiest way so if you want to learn about those three steps where I help others to become a web developer much easy and faster than they will do it on their own,so if that’s something that interests you consider subscribing; So before we start writing actually any code I want that to actually know about three different ways that you can use So before you do any coding you need to decide.We are going to use the first one its PHP arrays Basically that way is the simplest you are going to create just different files Contain each language that you have and then we would just from associative array call the key And then we will have it translated Get text is the another version, is quite hard.You will need to know how to set up your server need to know how to create that .PI O or PT files and It’s quite harder if you are just starting out out and never heard about it But if you guys want to learn any of those too, just comment below, and then I all probably do tutorial for you And then the last option Database storage is the one that.I usually use when I work on a large project on a serious project and when I’m going to bring another translation and so for that reason This one is pretty hard because it takes a lot of planning beforehand because of the database Optimization, and we really need to decide how we are going to add all those new language Etc.how to write the code for the first option So now I’m here at my PHP Storm and the first thing that we need to create is to actually Create the basic HTML document so first. I’m going to create of course some basic design for our website Amazing Website okay, and Now the next thing that I want to do is to actually download the Bootstrap.Because that is what I’m going to use so I all go to the get bootstrap.com then download and Then I will just use compiled CSS And JS okay so save Go to the folder extract And delete archive, and that’s it and inside here in the CSS folder We have everything that you need so here. I’m going to include it Okay So at the top, I’m going to use the navbar so I Will say classes is Navbar and then.let’s say you expand on the small devices It will set dark background, and then also let’s say that now bar will be dark.

Okay Good maybe let’s add text to the center and maybe let’s move the container for Maybe 100 pixels.Let’s see Okay, looks good and the last thing that I would love to do is to create a footer and then in this footer We are just going to put different languages that are available So we can write it here maybe So I all say class footer And we need to create this class okay, and here.I will just say like English and then Bosnian which is another option and then here I will just write The class footer so maybe let’s see it will be left up to 0 Position maybe let’s see fixed Let’s say bottom, align to the center Maybe color to the white we don’t see maybe let’s see Background dark Okay, it’s here, but maybe All right set To the 100%Okay, and that’s it so this is our footer here. We have two different languages that we can choose from Here is some title and some explanation about website and other we have many so pretty much those are Three or four different elements that you are going to have on almost any website, and now let’s see how we actually can translate this to the Bosnian language because at the moment you can see that this is all in the EnglishOriginally published at https://www.todayscomputerinfo.com on July 3, 2020.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners