File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes translating propertry files using saaj api Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "translating propertry files using saaj api" Watch "translating propertry files using saaj api" New topic
Author

translating propertry files using saaj api

janardhana Rao Nalam
Greenhorn

Joined: Jul 20, 2004
Posts: 6
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

Joined: Jul 13, 2001
Posts: 3150
  • 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


  • Spritle Software Blogs
    janardhana Rao Nalam
    Greenhorn

    Joined: Jul 20, 2004
    Posts: 6
    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

    Joined: Jul 13, 2001
    Posts: 3150
    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

    Joined: Jul 13, 2001
    Posts: 3150
    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

    Joined: Jul 13, 2001
    Posts: 3150
    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.
     
     
    subject: translating propertry files using saaj api
     
    Threads others viewed
    SOAP web service
    Sending calls from SOAP files
    can i use an xml file for internationalized text instead of Application.properties
    sun's coffee break & saaj
    JAXM
    IntelliJ Java IDE

    cast iron skillet 49er

    more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture