Multiple Languages On the Same Page

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Multiple Languages On the Same Page

Post 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?
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

what do you want to do? you need a combobox? or you need to have your page in multiple lang.?
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post by Pyrite »

Well, both. Kinda the same thing isn't it?
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post 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.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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.
microthick
Forum Regular
Posts: 543
Joined: Wed Sep 24, 2003 2:15 pm
Location: Vancouver, BC

Post 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
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post 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]
basdog22
Forum Contributor
Posts: 158
Joined: Sun Nov 30, 2003 3:03 pm
Location: Greece

Post 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!!!
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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.
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post 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 ;)
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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.
User avatar
Pyrite
Forum Regular
Posts: 769
Joined: Tue Sep 23, 2003 11:07 pm
Location: The Republic of Texas
Contact:

Post 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
Post Reply