hopefully this post is in the right place, I am a bit new to forums.
I am also new to webdesign so I have a noob question, like the title says.
How do I implement multiple languages for one website?
I would like to have a nice looking menu somewhere on my website where you can choose the language of your preference.
Before posting, I searched for other threads on this but I didn’t find andthing, like this question unfortunately.
Make duplicate pages in the other languages, save them in folders with an abbreviated code for the language - eg /en/index.htm for English, /fr/index.htm for French, etc, and link to the alternative language versions at top right or top left of each page. - it seems to be common to have these links as flags or same abbreviation as used for the folders . It’s not exactly a difficult problem to solve, is it?
These days, using Chrome, if I come across a site that’s not in my native language, I’m asked if I want it translated—meaning I can read it in my own language in an instant. Probably not ideal, but signs of a brave new world, indeed.
Are you currently learning a programming language? If you don’t intend to, then I recommend that you use a CMS that has good multi-lingual support, either directly built-in (can’t think of one) or via an add-on or plugin. Most of the popular CMSes have a few third-party solutions.
The logical way would be to have a website divided into equal sized chunks - one chunk for each language. The navigation structure and the formatting (the CSS) could be the same for all the chunks. You would just need to create translated pages named in the proper language (for search engine optimization). At least you do not need to worry about dulicate content
Do remember to change the language meta-tag in the head of each page.
I understand everything you advised and I think that is a very practical way of doing it.
Unfortunately at this point I lack the skills needed, so I will learn more about the details of it all first.
No fun for me if it isn’t perfect lol oh and thank you!
very interesting to read abut such a frequently queried question…personally I would tackle this slightly different from a sheer Google point of view…it is important that websites are easily understood by Google, it does not like dynamic content for one… so to do it properly i would create a variety of HTML pages (variant of the main homepage) and store this on a sub-directory so: [noparse]www.xyz.com/de[/noparse]. Then submit a sitemap in webmaster tools suggesting this change…
Create english.php, hindi.php and spanish.php
And define words and phrases in that file and use them in your php scripts accordingly.
You just have to load the language file that the user has selected.
$language["hi"] = "hi";
$language["howareyou"] = "how are you ?";
$language["hi"] = "namaste";
$language["howareyou"] = "kaise hain aap ?";
$language["hi"] = "hola";
$language["howareyou"] = "como es usta ?";
When a user comes to your site the default lang. file in english.php
Your php file should have something like that in it: