Main | Why Language Translation is Important »

June 12, 2008

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

http://profile.typekey.com/juneegirl

I installed your plugin tonight and have set it up according to the instructions. The javascript is referencing the right post id but its not translating the text. Is there something I'm missing here?

Nicholas.K

Hi Bryan,
Thank you for your effort to make this plugin available. I have an idea for the future releases. It will make a big difference on SEO if the plugin could catch a copy of a translation and save it in the cache. Then we can use different URLs for different languages. Something like a translation script you find here: http://forums.digitalpoint.com/showthread.php?t=42057. This way, search engines could crawl the translations. The only problem with that script is that it requires "Safe mode" to be off and this is not something everyone can decide on.

meck

Hi Bryan!

I've installed your plugin and I see the Translate link appear. When I click it the multiple languages appear. Great!

However, when I click any of the languages (let's say Arabic) it's trying to execute "language_translate('asset-body-10','language-translate-target-10','en','ar','10')". But nothing happens.

I suspect my problem is with the last part of your instructions about the DIV tag. Can you explain in more detail what and where I need to add the "corresponding id on the appropriate div tag"?

Can't wait to see this in action!

Bryan Tighe

For those of you having problems... Yes, you will need to give the DIV tag an ID in order for the translation to work. Basically, you can do this:

div class="asset-body" id="asset-body-$MTEntryID$"
$MTEntryBody$
/div

The default templates do not already give an ID to the DIV tag, so you will need to provide one. Remember, and HTML ID must be unique to the page, and that's why you need to put the MTEntryID in it. Basically, you're telling the MTTranslateMenu tag which DIV tag to translate by passing in its unique ID.

You will probably need to do the same for both the Entry Detail and Entry Summary templates (assuming you are using the default "Classic" templates).

I hope that helps. Please post if are having any more problems.

meck

Thanks, Bryan!

Finally got it working. Your comments aren't allowing me to use HTML but I did have to modify the id="asset-body-$MTEntryID$" above to include angle brackets around $MTEntryID$.

I found the best place for the original two lines of code you provided
was after [open angle bracket]/MTIfNonEmpty[close angle bracket] in both Entry Summary and Entry Detail.

A couple of observations:

If I translate English to English (testing the result to make sure it translates properly) I see some additional line breaks in odd places. Those may be due to Google.

Also, I'd suggest not translating anything in code tags such as when I'm providing technical command line instruction.

Otherwise, I think this is a fantastic plugin! Probably my favorite so far.

thegreenpages

Here is another example that worked for me in the Entry Detail template module...

" class="post-alt blog">




">


">

asset-body-


Wigoelbar

Hi brain,

Could you translate this tutorail in french ? please ^^.


lol :p

hehehe, no without a joke.. I tried to install the plugin but i think i didn't understand anything.
Where the translate file must be uploaded ? In the MT root ? Or in MT/plugins ?

Further problems for me.

Thanks for your answer and for this nice and helpfull plugin.

Bryan Tighe

Just like all plugins for MT, you need to make sure that the directory structure that comes in the zip file remains intact. In other words, make sure that the contents of the "plugins" directory gets put into the "MT/plugins" directory of your MT installation. Also, the contents of the "mt-static" directory need to be copied to "MT/mt-static". I hope that helps.

-Bryan

Arnoo

hi
i installed this plugin but i have many problem.
it shows only empty box on my site
can you get me a complete example?
please see this plugin in my site. i waiting for your response

best regards
Arnoo

Bryan Tighe

Arnoo, it looks like you did not specify the html id for the body of your entry. I'm not seeing an empty box, I see the list of flags and languages. But the links are not translating because you did not set the html id. If you see an empty box, perhaps you need to upgrade your browser. What browser are you using?

Make sure you do this:
div class="asset-body" id="asset-body-$MTEntryID$"
$MTEntryBody$
/div

And then do this:
mt:setvarblock name="sourceid"asset-body-$MTEntryID$/mt:setvarblock
MTTranslateMenu sourceid="$sourceid" /

Post your template code if you are still having problems. I hope that helps,
Bryan

Arnoo

hi Bryan
thanks but i still see the empty box, you can see in this pic: http://i36.tinypic.com/2qlfxuv.jpg
would you show me what you see?
i check my site on 2 computer, my browser is firefox 3 and IE6

this is my template code:
div class="asset-body" id="asset-body-$MTEntryID$"
p $MTEntryBody$ /p
/div
mt:setvarblock name="sourceid" asset-body- $MTEntryID$ /mt:setvarblock
MTTranslateMenu sourceid="$sourceid" /

thanks
Arnoo

sd

Hi bryan
Is it possible to use this plugin with "Typepad"? If yes, the how?
Thanks in advance
sd

Bryan Tighe

Arnoo,
Everything now looks good on your blog to me.
Here is what I see:
http://bryantighe.typepad.com/photos/files/translatearnoo.html

I see the list of languages with flags, and the translation works, too. I think something might be wrong with the javascript on your browser. Do you have javascript disabled? It needs to be enabled if so.


sd,
Sorry, but you can't use this plugin for TypePad, only Movable Type.

orajen

I have the translator working but it will not translate the extended part of the entry. Here's my code without open/closing brackets:

mt:setvarblock name="sourceid" asset-body-mt:EntryID
mt:setvarblock
mt:TranslateMenu sourceid="$sourceid"
p
div class="asset-body" id="asset-body-mt:EntryID "
mt:EntryBody
mt:EntryMore
div
.
.
.

Bryan Tighe

orajen - can you post a link so that I can check it out? Your template code looks good to me.

pter

Hi Bryan,

This plug in is great. I notice, though, that if any other divs live within the asset-body-mtentrynumber div, I get lots of garbage...

But if there are no other divs within the translated div, it works great.

Is there a way to exclude a block of html from the translator like

?

Bryan Tighe

pter - Google's translation service should filter out the html. What type of garbage are you getting? There is not a way to exclude certain parts of the content.

ptr

Hrm, it's not the divs... Is there an email address I can send the link to? I'd rather not publish the link publicly...

Bryan Tighe

ptr - send it to me at btighe (at) sixapart.com

Generic Viagra

Thanks so much for posting the link to that great tutorial. I had good fun this afternoon making a basket and, like an earlier commenter, can say that the slightest difference in square size makes a basket of rather different proportions. I'll follow the instructions *to the letter* next time!

http://buyonline-rx.com/sitemap.html
http://buyonline-rx.com/ed.html

The comments to this entry are closed.