Page 1 of 1

Multiple Languages On the Same Page

Posted: Mon Dec 29, 2003 6:49 pm
by Pyrite
Hi,
I have a localized site, and the main page needs a language selector. I am wanting to have a drop down list box that lists the languages my site has in their own language (ie. Chinese in Chinese, Arabic in Arabic etc. I assume this would use the same concept as using multiple languages of text on the same page. Anyone know?

Posted: Tue Dec 30, 2003 10:30 am
by AVATAr
what do you want to do? you need a combobox? or you need to have your page in multiple lang.?

Posted: Tue Dec 30, 2003 5:07 pm
by Pyrite
Well, both. Kinda the same thing isn't it?

Posted: Tue Dec 30, 2003 5:14 pm
by AVATAr
well is not is the same... one thing is if you have to translate single words.. like the content of a combobox or a menu.. and another thing is to translate the content of a page like an institutional one.

Posted: Tue Dec 30, 2003 10:49 pm
by Pyrite
This has nothing to do with translation.

I just want to have some arabic, chinese, korean, vietnamese text on the same page. Doesn't matter where I put it.

Posted: Tue Dec 30, 2003 10:52 pm
by microthick
The sites I've seen that sorta have what you're talking about rely on images to show Vietnamese in Vietnamese, Japanese in Japanese, etc.

For example:
http://www.java.com/en/download/windows_automatic.jsp

Posted: Wed Dec 31, 2003 5:21 am
by AVATAr
well, in our automated site: http://www.strixs.com

we have used 2 things
  • for static content like menues we use a word translator db, like partners -> asociados, news -> noticias.
  • for dinamic content like news, products and partnes, the user enters the article in many langs. We make a small script that recognizes the lang the user select and search the appropiate content in the DB.
[/list]

Posted: Wed Dec 31, 2003 5:25 am
by basdog22
Well i think that if you need to have other languages on your page you just set iso-8859-@

where @==7 or something.

When i want to have Greek chars i do iso-8859-7 and i can have English, Greek, and whatever i want!!!

Posted: Wed Dec 31, 2003 6:31 am
by Pyrite
Ya know what just forget it. I think Microthick is the only one here who has a clue what I'm talking about. And he's right, I'll probably have to use images.

Posted: Wed Dec 31, 2003 8:08 pm
by m3rajk
basdog: your answer isn't as wrong as it is premature. i've known what pyrite is asking but don't have an answer and know it. i'm speaking up now to clarify since i agree with him, it seems most have the wrong idea.

basdog's is "premature" because that just tells the browser how to interpret what it sees for rendering.

the only thing iknow of that does what pyrite wants is that some of the browsers have translation engines that can map from one set to another. however what's being asked for here is how to set it up so that they can have it display int he native language by translating a single source.

sort of like taking babelfish to the site and going from english to another languages... only having it built in and that they have a drop down menu they can use to select their language... and have that always be there. using each article (the article names genereated dynamically) in al the languages.

i think my understanding of what's wanted is closer than some others, but still off. i hope it's close enough to clarify since it MAY lead to someone giving an answer.

pyrite: i'm sorry i cannot be of more help. however i've been watching because i find this intruiging and know it could come in useful if someoen has an answer

Posted: Thu Jan 01, 2004 4:59 am
by Pyrite
NOPE! Sorry m3rajk

Guys this is not a hard concept. You can define a charset for a language with the php header function and using the meta tag to define a character set used on a webpage. But that is just to define one language. I want to be able to use text in multiple languages on the same page. This is nothing dynamic, or translation related or babelfish related. The only way I know how to do so is to use graphics of the text in different languages.

Posted: Thu Jan 01, 2004 5:05 am
by JAM
After reading the posts I'm abit confused also (sorry hehe).

Does sure sound like you can have different language-pages;

Code: Select all

// lang-se.php
<?php
 $text['greeting'] = 'Hej & välkommen till...';
 $text['copyright'] = 'Sidan skyddas enligt upphovsrätt bla...';
 $text['words']['hi'] = 'Hej';
?>
// lang-en.php
<?php
 $text['greeting'] = 'Hello and welcome to...';
 $text['copyright'] = 'This page is protected by the laws of yada...';
 $text['words']['hi'] = 'Hello';
?>
that you later can include/require based on the users preferences...

If I'm to way off, sorry ;)

Posted: Thu Jan 01, 2004 5:21 am
by Pyrite
You're way off.

I think too many people have confused the others in this thread.

Lets make this more simple.

I want to have Chinese and Korean text on the same static, non php, plain jane non dynamic html page.

And I should probably clarify that I'm not using Unicode, otherwise I think this would be possible.

Posted: Thu Jan 01, 2004 5:33 am
by Pyrite
See like this page (http://www.unicode.org/reports/tr9/), down under acknowledge ments they have english, hebrew and arabic text on the same page. They are defining the characters using unicode though. Which means they can tell the browser they are using unicode and then use whichever language they want.

However, I want to use language characters sets like gb2312, windows-1256 etc. ie non-unicode text on the same page. I don't think this is possible, but just asking if anyone has any experience with this.

Posted: Thu Jan 01, 2004 5:39 am
by Pyrite
See if you look at this page, you'll see on the left side over 50 different languages in text used on the same page. This includes bidi (bi-directional) and multibyte characters. Unicode (utf-8) makes this possible. But my text isn't unicode (unfortunately).


http://www.unicode.org/standard/WhatIsUnicode.html