Forum Moderators: open

Message Too Old, No Replies

Babelfish is slowing me down

         

grandpa

5:32 am on Mar 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Wow- it looks cool on my page, and makes it look like I'm doing something cool... nevermind that I can't read any of the languages and I suspect the translation itself may be, umm, not exactly right.

What's got me miffed is the dang thing sometimes is very slow loading, and my page just waits for it to finish.

Here's the deal. Directly below my body tag, and my first div, I've got a JS insert that pulls in my babel. Right now it's disabled on one of my sites because it takes too long too load. Tomorrow it might be quick as greased lightning.

Here's how it looks:
<body class=b>
<div class=div>
<js babel>
</div>
...

I need a way to position this on the page and have everything flow *around* it while it lopes along, allowing the rest of the page to display. My first thought was to place it in a div and use z-index. But my assumptions about what z-index can do seem to be wrong (I've never used z-index)

Is there a way to accomodate this (sometimes)slug at the top of the page and still have page load, even if the babel never loads?

tedster

7:17 am on Mar 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you're on a good track, but you picked up on the wrong part.

z-index only takes effect with absolutely positioned elements -- and it's the absolute positioning you want, not necesarily the overlay effects you can achieve with z-index.

So position the bablefish div absolutely, with the offset coordinates you need to position it properly when the whole page renders -- and then place the code for the bablefish div at the very end of your HTML.

In general, a page elements begin rendering in the order that they appear in the HTML document. So every thing else on the page, especially the text, should come in before the js for the babelfish starts to do it's thing.

[edited by: tedster at 11:37 pm (utc) on Mar. 20, 2004]

grandpa

7:35 am on Mar 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for explaining that.

Absolute positioning. That sounds like it's going to be fun...

RammsteinNicCage

1:47 pm on Mar 20, 2004 (gmt 0)

10+ Year Member



You can almost guarantee that the translation is off, especially if it's more than a few words. ;)

Jennifer

jomaxx

4:58 pm on Mar 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you talking about the Javascript AltaVista provides that inserts a Babel Fish link on your page? If so, you can probably just take AltaVista's JS and insert it into your HTML code directly, bypassing the need for the include.

Or are you actually including the translated text? If so, is there a way to do that with Javascript alone, or are you using an IFRAME or some kind of screen scraper application to insert the translation?

Thanks.

grandpa

7:16 pm on Mar 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can almost guarantee that the translation is off, especially if it's more than a few words.

Ya... someone here is the house has looked at the Spanish translation, it's not too bad.

jomaxx - It's not Alta Vista. Rather than run afoul of the TOS and mention the name of the service, I'll just say that it appears to take my content and run it thru a translator, and then pop-up a new page with my layout.

Anyway, I got it positioned (almost where I want it) on the page and the code is the last thing to find in the page html. No more concern about losing someone because the page takes too long to load.

grandpa

12:43 pm on Mar 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Let me close this out by saying I learned two things today.

First, when to use absolute positioning.

Second, whom to avoid for online translation services.