Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

translating propertry files using saaj api

 
John Neel
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are developing an internationalized application, where in we're maintaining the text to be internationalized in respurce bundles(.properties).

I heard that saaj api provides language translation services.

can you please advise me how to use it, as i'm completely unaware of java webservices. what is the minimum i should be having to use this?

Thanks in advance,
Janardan
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • Welcome to Javaranch Janardan. First! Could you please change your display name according to our naming policy http://www.javaranch.com/name.jsp
  • Now..where did you read that SAAJ helps for language translation?? Can you provide some links.BTW using resource bundle is the best idea for internalization.
  • Webservices. With webserivces, Your clients can call you webservices methods by supplying languge code as parameter. For example String getData(String langugecode) will return internationalized data according to the input parameter languagecode. Apache axis is the best start to learn about webservices. It has good documentation to get started. http://ws.apache.axis/java
  •  
    John Neel
    Greenhorn
    Posts: 6
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi,

    Thank you for your input.

    http://babelfish.altavista.com/babelfish/tr is a web service that provides language translation services. I saw a code snippet which access this webservice using saaj api.

    I agree that maintaining resource bundles is the correct way.
    But my intention is different. I want to use this service to just to create language specific resource bundles from an english resource files(i18n_en.properties).

    The code which i've seen uses servlets to access this web service.
    I am using oracle oc4j as my application server. Can I use swing client to access this web service? If so, can you please guide me further...

    Thanks and Regards,
    Janardan
     
    Balaji Loganathan
    author and deputy
    Bartender
    Posts: 3150
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by janardhana Rao Nalam:

    http://babelfish.altavista.com/babelfish/tr is a web service that provides language translation services. I saw a code snippet which access this webservice using saaj api.

    Ok, wsdl file of babelfish http://www.xmethods.net/sd/2001/BabelFishService.wsdl seems to accept two inputs,translation mode and sourcedata. the return data is a string. So you dont need SAAJ api to access and consume this service. SAAJ API is used for sending and receiving file attachments along with SOAP message.
    More about SAAJ API http://java.sun.com/xml/saaj/index.jsp
     
    Balaji Loganathan
    author and deputy
    Bartender
    Posts: 3150
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by janardhana Rao Nalam:
    I want to use this service to just to create language specific resource bundles from an english resource files(i18n_en.properties).

    Sorry, i am not getting your logic here or the actual user scenario. Can you explain more specific and descriptive, escp the input output scenario.
     
    Balaji Loganathan
    author and deputy
    Bartender
    Posts: 3150
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by janardhana Rao Nalam:

    Can I use swing client to access this web service? If so, can you please guide me further...

    Yes oc4j got a inbuilt SOAP API implementation. Sample code were available here => http://www.oracle.com/technology/sample_code/tech/java/web_services/index.html .
    Yes you can use swings to access any webserive. Googling found this article http://javaboutique.internet.com/tutorials/Axis2-2/.
    If you want to learn webserivce either start using Apache Axis or oc4j link mentioned above.
     
    Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
    the new thread boost feature: great for the advertiser and smooth for the coderanch user
    https://coderanch.com/t/674455/Thread-Boost-feature
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!