Topic: Web page in 2 languages Pages that link to <a href="https://ozoneasylum.com/backlink?for=27287" title="Pages that link to Topic: Web page in 2 languages" rel="nofollow" >Topic: Web page in 2 languages\

 
Author Thread
tj333
Paranoid (IV) Inmate

From: Manitoba, Canada
Insane since: Oct 2001

IP logged posted posted 01-09-2006 03:38 Edit Quote

I'm been asked to translate a web page into a second language.
Now I'm wondering if there is some way to do this without making doubles of all the html pages since that would be a mess to keep updated.
The idea is to be able to press a button on the page and have it go to the other language for the user and to be able to send the user a link for one language or the other.

Can anyone point me in the right direction for a cleaner way to do this?
I can do a decent amount of programing so that not too much of concern.

__________________________
Eagles get sucked into jet engines and weasels are oft maligned, but beavers just make nice hats.

Blaise
Paranoid (IV) Inmate

From: London
Insane since: Jun 2003

IP logged posted posted 01-09-2006 11:08 Edit Quote

I believe that at the end of the day the content will have to be held in a different language, so unless you have the content on your website managed froma database via ASP/PHP/.NET etc, then I'm afraid you will have to have two versions of all the HTML pages.

Cheers,

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

IP logged posted posted 01-09-2006 11:29 Edit Quote

Indeed, Blaise is right.

You should read up on multi-language websites with Apache though - it does make things easier.

tj333
Paranoid (IV) Inmate

From: Manitoba, Canada
Insane since: Oct 2001

IP logged posted posted 01-09-2006 18:27 Edit Quote

Thanks for the help guys. Since there are no databases on the site its time to get to work on making the other pages.
Tyberius Prime: I'll look into that. I've only read a bit of the link but it seems like it could be helpful.

__________________________
Eagles get sucked into jet engines and weasels are oft maligned, but beavers just make nice hats.

divinechaos
Obsessive-Compulsive (I) Inmate

From:
Insane since: Dec 2001

IP logged posted posted 01-10-2006 06:21 Edit Quote

When I read the question, I wondered whether you couldn't include both languages in the markup and specify the visible one via CSS. I searched a bit and couldn't determine it impossible (because Stu Nicholls and Eric Meyer have often done what I once thought impossible), but I haven't found a method yet.

Cheers,
DC

Suho1004
Maniac (V) Mad Librarian

From: Seoul, Korea
Insane since: Apr 2002

IP logged posted posted 01-10-2006 06:42 Edit Quote
quote:

divinechaos said:

When I read the question, I wondered whether you couldn't include both languages in the markup and specify the visible one via CSS.



I don't know if it's possible using only CSS, and even if it is, you'd have to rely on cookies (for consistency) and figure out what to do if someone (for example) sent a URL to someone else. How would you know which language to display? I think the best bet here would be to go the route Blaise outlined (that is, server-side scripting).

I want to add that the site doesn't necessarily have to be database-driven for this to work. You could store the content in text files and include them in the appropriate locations. Menu items, etc. could be built into the code and triggered based on the language variable. It wouldn't be much more difficult to accomplish than a single-language PHP (or whatever) driven site. After all, the different language versions are just different content.

(Tangent: as a translator, I look at this problem from a semantic point of view, and I just wanted to make sure you realize that the different language versions are indeed different content, not just different versions of the same content. By that I mean your content will (or at least should) change depending on your audience, so keep that in mind as you translate. Apologies if that's already obvious to you. End tangent.)

___________________________
Suho: www.liminality.org | Cell 270 | Sig Rotator | the Fellowship of Sup

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

IP logged posted posted 01-10-2006 09:40 Edit Quote

Plus, if you were to hide them via css you're instantly doubling (on average) your content bandwidth - leading to slower downloads.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

IP logged posted posted 01-10-2006 14:54 Edit Quote

The way that I have seen internationalization working is with Keys.

In our xml content we use i18n which would be used as such.

<i18n>query.message.success</i18n>

We would send this page through an additional translation step which would replace the key with the appropriate message.

In PHP sites I have seen the keys done using associative arrays.

i18n['query.message.success']

Which has its key value stored in a separate file that is included.

You can use the language to control which external key file is loaded to do the key replacement. With the key approach you have a centralized location where all of your text strings are stored, and you can easily and quickly setup a program which will allow people to translate these values into additional languages via a web gui. I have seen this for some open source applications and you can have some rapid internationalization going on if you use this approach.

Dan @ Code Town

divinechaos
Obsessive-Compulsive (I) Inmate

From:
Insane since: Dec 2001

IP logged posted posted 01-10-2006 23:46 Edit Quote
quote:

Tyberius Prime said:

Plus, if you were to hide them via css you're instantly doubling (on average) your content bandwidth - leading to slower downloads.



True. I was considering it for a 10-page promo site, not really for enterprise use. If the content is less than 5kb per page and you've got a 50kb page, it's not that much more; especially if you're not near your bandwidth quota. But, you're right; it's something I had wrongly dismissed; I was just trying to find something cool to do with the lang attribute, not just adding classes or id's.

Instead you could use XSLT, but would have to do it server-side, because most browsers still don't support client-side application.

Cheers,
DC

(Edited by divinechaos on 01-10-2006 23:46)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu