Hi i am using Google.com Language Translation to let people that don't read English to read my site in there Language. Is there a way i can make it when they view my page in chines they get the chines image instead of the English text.
Thanks
Hi i am using Google.com Language Translation to let people that don't read English to read my site in there Language. Is there a way i can make it when they view my page in chines they get the chines image instead of the English text.
Thanks
The web in one word.
Not when using automatic translation, no. You have to translate the images manually, and you'd then have to set up manually-translated versions of the pages, too.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
I can see this being easily done with PHP:
Write this to your URL once you convert to chinese:
yourPage.php?lang=chinese
Use this php script on every page you need to replacing the <img> tag:
PHP Code:<?php
$lang = $_GET["lang"];
if ($lang == "chinese") {
echo "<img src=\"chinese replacement\">";
}
else {
echo "<img src=\"original image\">";
}
?>
- Mike
any way to do this in html
The web in one word.
No. You can use Apache's content negotiation to serve up appropriate versions, but again you'd have to manually translate all your pages.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
I have a theory. Might not work. And somewhat complex.
Impliment javascript on the page to get the current URI. When google translates a page, it has, as a get variable (like page.php?lang=EN, etc) the language code. You could dynamically change the source of the image based on this, to, for example, EN.jpg
However, I see problems that could happen from it as well.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Yeah, starting with:Impliment javascript on the page to get the current URI.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
kool i will have to think about all this it may be easyer to translate each page one by one and do it myself. like let google translate the page but if some one is from china they see the chinese images. they would have to click on there flag or something.
The web in one word.
Bookmarks