Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Roy Brondgeest
IDE build-lang translator not working
June 22, 2011 12:11 AM
Answer

Roy Brondgeest

Rank: Junior Member

Posts: 25

Join Date: January 13, 2011

Recent Posts

Hello Everybody,
I have a question that I hope someone can answer.

I have the "early access edition" of liferay in action. In this book it says that liferay is capable of translating Language.properties files automagically using an online translator service. (see bottom of post)

Problem is that my language.properties file wont be translated correctly. I get the other language.properties files but theyre not translated as I would expect.

In "Language.properties" I have:
product-saved-succesfully=Product Saved Successfully
In "Language_nl.properties" I get:
product-saved-succesfully=Product Saved Successfully (Automatic Translation)

What has just happened? The Plugins SDK contains Ant targets which have the ability to use an online service
to translate all of the keys in your file to multiple languages. All we did by providing the Ant task we created was to
give those Ant targets the parameters they needed to do their work: namely, the folder where our
Language.properties file exists and the name of the file. Once we did that, we were able to use the service to
generate all of the language files you now see in that folder.
Sandeep Nair
RE: IDE build-lang translator not working
June 22, 2011 1:47 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1692

Join Date: November 5, 2008

Recent Posts

Hi Roy,

As its mentioned it only uses Babelfish to generate transalation. So for most of the languages it wont have proper translation. The idea behind using the tool is to generate all the language files with keys(which is more important), some language will have translation(for example may be spanish look for language_es) but you should not rely on that transalation. You should manually change the translation for the languages you want to be available.

Regards,
Sandeep
Roy Brondgeest
RE: IDE build-lang translator not working
June 22, 2011 1:51 AM
Answer

Roy Brondgeest

Rank: Junior Member

Posts: 25

Join Date: January 13, 2011

Recent Posts

Hello,
Thanks for your answer.
I checked all the language files and there doesn't seem to be anything translated.
Neither the spanish one.
Sandeep Nair
RE: IDE build-lang translator not working
June 22, 2011 4:01 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1692

Join Date: November 5, 2008

Recent Posts

Ok just check with an easy translation text like "help" or "hello" and make sure you are connected to internet while doing this and if Liferay is able to access the internet(means not behind proxy)

Regards,
Sandeep
Roy Brondgeest
RE: IDE build-lang translator not working
June 22, 2011 4:21 AM
Answer

Roy Brondgeest

Rank: Junior Member

Posts: 25

Join Date: January 13, 2011

Recent Posts

I tried that, nothing...

I am connected to the internet, do have a firewall but it does not block any outbound traffic.
Dave Weitzel
RE: IDE build-lang translator not working
June 22, 2011 7:11 AM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 186

Join Date: November 18, 2009

Recent Posts

Check the console out put for messages from Babelfish.
you may find that you have exceeded the number of connections allowed in any one period.
If you are only supporting a few languages it is easier to cut and paste and rename files so you have a file for each language / variant with necessary keys.
MsAngel John
RE: IDE build-lang translator not working
October 5, 2011 5:22 AM
Answer

MsAngel John

Rank: New Member

Posts: 1

Join Date: October 5, 2011

Recent Posts

I use internet last 5 year and do have a firewall but still it does not block any outbound traffic.



Legal Translation
amran loudi
RE: IDE build-lang translator not working
December 16, 2011 9:49 AM
Answer

amran loudi

Rank: New Member

Posts: 3

Join Date: December 16, 2011

Recent Posts

MsAngel John:
I use internet last 5 year and do have a firewall but still it does not block any outbound traffic.



yes I agreed with you I am also using internet last 10years but there is no problem. I think you install new window. its good.
_________________________
DropShip
Dominik domih
RE: IDE build-lang translator not working
January 23, 2012 6:27 AM
Answer

Dominik domih

Rank: Junior Member

Posts: 56

Join Date: November 10, 2008

Recent Posts

It appears that the automatic translation tool is working but my desired languages are not translated. As Sandeep wrote the build-lang task uses babelfish, which is limited to a hand full of languages.
That's possibly the cause why e.g. hu, cz or pl are not translated..

edit: nl autotranslation (via babelfish) seems to work! This was generated after adding what-about-the-future to Language.properties :
1what-about-the-future=Wat over de toekomst?
Paul Kearney
RE: IDE build-lang translator not working
March 4, 2012 3:31 PM
Answer

Paul Kearney

Rank: New Member

Posts: 6

Join Date: February 28, 2011

Recent Posts

Another thing to check for anyone with a similar problem is that you haven't included comment lines.

When initially trying to use the build-lang target/service I had commented some of my properties for easier identification

i.e.
# Error message for X form

# View messages

This caused issues for me. The various translation files were generated but no translation was provided for any language.

Removing the comments, deleting the previously generated files and re-running the build-lang target resolved this issue for me.
Łukasz Pogorzelski
RE: IDE build-lang translator not working
April 12, 2012 5:48 AM
Answer

Łukasz Pogorzelski

Rank: New Member

Posts: 6

Join Date: April 12, 2012

Recent Posts

In Liferay 6.0.5, 6.0.6 automatic translations doesn't work. It was fixed in version 6.1. See http://issues.liferay.com/browse/LPS-12415
Jaynil A Bagdai
RE: IDE build-lang translator not working
May 21, 2012 11:37 AM
Answer

Jaynil A Bagdai

Rank: Regular Member

Posts: 120

Join Date: March 3, 2012

Recent Posts

As per logs to above link it says that it has been resolved in 6.1

I am using Liferay 6.1 JBOSS bundle, Files for different languages are being generated but values for keys are not being translated.


Any help will be appreciated.

Thanks.