Web Hosting Talk







View Full Version : Multilingual website


vajjas1
06-08-2007, 03:17 AM
Whats the bestway to have a multilingual website?. I don't want to register my domain with .fr,.jp or .in or anything else country specific TLD. Is there a easy way to display the website in a different language (other than english) as choosen by the visitor?

volmasoft
06-09-2007, 06:31 PM
yes,
It's a small bit of programming.

If you need help with it give me a pm.
Nat

mrphp
06-10-2007, 08:57 AM
Use this approach

1. make a language directory like
languages/english
languages/german
languages/french
languages/spanish
2. For each language directory make a file/s that has a set of
defined constant with it corresponding values like

languages/english/index.php
define('BUY NOW', 'Buy Now');
languages/german/index.php
define('BUY NOW', 'German word of buy now');

3. That way, you can call which language to be use then
call its defined constant.

I hope you understand my idea.


Anyway, good luck. I have to do, urgent meeting something came up.
see yeah.

regards

Jay August
06-10-2007, 10:35 AM
Get a CMS that serves the right language to your visitors from reading their IP and hostname. Contrexx CMS does that, and it's a beautiful CMS!

gRF
06-10-2007, 02:43 PM
Also, don't forget to define character set in <head> section:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

That line has to be first in <head> section, before title, description, keywords...

vajjas1
06-10-2007, 05:03 PM
wonderful ideas, thank you, i can't PM yet. :-(

fastnoc
06-10-2007, 05:05 PM
I think the suggestions above are great. I haven't had a lot of experience in the design aspect of websites, but from a programming standpoint once you get through the first part the rest is pretty simple. But don't get me wrong, it's still a pain in the rump to do. phrasing all the text can be very annoying.

DomainTycoon
06-10-2007, 10:24 PM
Create an option for the user to choose the language. When the user selects the language, you can have the script set a cookie or start a session. The actual language files should be something like:

$error_user_exists = "That username is already in our database";

And in the script it would be something like:

<?php

if(mysql_fetch_array(mysql_query("SELECT * FROM users WHERE usersname = '". $username ."'")))
{
print $error_user_exists;
}

?>

The above is all PHP, easy to use. If you need any help, contact me.

vajjas1
06-11-2007, 01:30 AM
Thank you all. :-), we are doing a major redesign and thus these questions.

Msite
06-11-2007, 05:28 PM
Go into Google Languages and enter the URL you want to translate along with your translation choices (English to German, etc). Google will provide a translation of the full site in your chosen language. Take the URL that Google kicks out for your translated website, and instruct your site's visitors who want translated versions to copy and paste the URLs Google provides for their specific language into their browsers.