Jump to content

Language Translation


SirFency
 Share

Recommended Posts

You need to put all of the text that would appear on any page into a language-specific include file that just defines the various text strings to appear on the pages. You need one language file per language that you want to support. You need a server-side language like PHP or ASP or ColdFusion that includes the appropriate file and writes the various pieces of text where they go on the page. Then you just need a way to pick the language. Instead of a static page like this:

<html>  <head>	...  </head>  <body>	<h1>The Best Website Ever</h1>	<div>Description about the site</div>  </body></html>

You would define everything in a variable and use the variables in the body instead. This uses PHP and doesn't use include files (the variables are just defined on the page), if you were actually to do this you would want to put each language in its own file and then just include whatever file for the language you want to show.

<?php$title = 'The Best Website Ever';$description = 'Description about the site';?><html>  <head>	...  </head>  <body>	<h1><?php echo $title; ?></h1>	<div><?php echo $description; ?></div>  </body></html>

That's a pretty basic example, but it should give you the general idea. There are several topics about this in the PHP forum.

Link to comment
Share on other sites

The best way to accomplish that is to hire translators that know all the languages that you intend to translate your page to.Being bilingual, I know that automatic translators often give bad results.

Link to comment
Share on other sites

I may have confused you. I'm confused for sure. I was thinking there would be a way to add a snippet of code and it would know if your in japan how to translate the English page into Japanese. Or if your in Germany it would translate the page into German. I'm certainly not writing copy in all the languages there are available.

Link to comment
Share on other sites

I may have confused you. I'm confused for sure. I was thinking there would be a way to add a snippet of code and it would know if your in japan how to translate the English page into Japanese. Or if your in Germany it would translate the page into German. I'm certainly not writing copy in all the languages there are available.
There are tools for that, but like Ingolme said already, they often give bad results. You should only translate your pages to languages you are sure about. For other languages, the best you may do is give links to such tools (e.g. Google Translate).
Link to comment
Share on other sites

Guest FirefoxRocks
OK thank you for the information. It looks like if this is something I have to implement I'm sending people to Bablefish or something along those lines.
I recommend sending people to Bing Translator (Formerly Windows Live Translator) for more accurate results:http://www.microsofttranslator.com/
Link to comment
Share on other sites

No, don't use bing translator.I just tested translating a sentence to Spanish and Bing makes no sense whatsoever

Original sentence: "Good morning, I'm testing this translator to see exactly how accurate the results are"Bing: "Buenas morning, yo soy prueba este traductor para ver exactamente cómo precisa los resultados son"Which means: Good "morning," I am proof this translator to see exactly how it requires the results areGoogle Translator: "Buenos días, Estoy probando este traductor para ver exactamente cómo los resultados son precisos"Which means: Good morning, I am testing this translator to see exactly how the results are precise.
Google translator is by far the most accurate translator on the internet: http://translate.google.com
Link to comment
Share on other sites

Guest FirefoxRocks
No, don't use bing translator.I just tested translating a sentence to Spanish and Bing makes no sense whatsoeverGoogle translator is by far the most accurate translator on the internet: http://translate.google.com
Ok well I guess it depends on the language you are translating into, and the context of the text you are translating (computer-related or not).
Link to comment
Share on other sites

Ok well I guess it depends on the language you are translating into, and the context of the text you are translating (computer-related or not).
I can tell you for sure that the results from Bulgarian to English and from English to Bulgarian are just as innacurate every time.In fact, there was one piece of video in which a show used Google translator to mock our politicians. They entered "Is Stanishev responsible for the halted money from the EU?" in Bulgarian (and FYI, Stanishev is our ex-prime minister), translated it to English, then back to Bulgarian, and they got "Stanishev is responsible for the halted money from the EU" :) .I'm betting the same is true for most languages.Forget about automatically translating your pages with Google Translator. If people really want your content, they'll use it anyway. Like I said, the best you can do is give a link to Google Translate at a visible place. Edited by boen_robot
Link to comment
Share on other sites

A site of mine often got hits from Google Translator, people who wanted to read my reviews in Italian or such. You can build such a thing into the way your site links, see how the translator's URL's parameters work and play with that in your <a href>-tags. Please do keep in mind that you want to allow your users to switch that off without much hassle. If I'm on vacation in, say, Greece, and want to quickly check your site, I don't want to read it in Greece.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...