Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2012
    Posts
    2
    Rep Power
    0

    Default How to get Translateable Strings form java source file

    Hello All,

    Actually i want to get all displayable or translateable strings form my existing java source files. can you please recomend me any good API for that?

    I will be greatfull.

  2. #2
    Gorilla Logic is offline Member
    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0

    Default Re: How to get Translateable Strings form java source file

    What do you mean translatable?

  3. #3
    Join Date
    Jul 2012
    Posts
    2
    Rep Power
    0

    Default Re: How to get Translateable Strings form java source file

    Quote Originally Posted by Gorilla Logic View Post
    What do you mean translatable?
    Translatable means, the strings I can translate into another language. The strings that are going to be displayed on Console or GUI
    I have found an API called GetText. This is Linux based API and i need one module of this. Which is XGetText? I am looking for jar file for this API so that i can use this in my Java project

  4. #4
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,573
    Rep Power
    12

    Default Re: How to get Translateable Strings form java source file

    Are you talking about the GNU GetText package?

    This is something more than an API: it is a set of tools which "include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organzation for those message catalogs, a runtime library that supports retrieval of translated messages, and a few stand-alone programs to manipulate sets of strings". It's not tied to Linux (you can use these tools on Windows) but - at least the runtime library - is intended for programs written in C or languages which offer straightforward bindings to that language.

    Support for something similar is available for programs written in Java. Many techniques are described in the Internationalisation trail of Oracle's Tutorial.

    You ought to be forewarned that there is no magic bullet that will apply these techniques to existing code. Eg, how could a piece of software reliably distinguish between strings you intend to be presented to the user and which ought to be localised and strings that are "internal" to the program? This applies to the GNU package as well which is why its authors talk about programming conventions and directory structure organisation as well as providing a runtime. Tools may help, but at the end of the day your application has to be *designed* with internationalisation in mind.

Similar Threads

  1. Replies: 7
    Last Post: 08-29-2011, 07:35 PM
  2. Get source code from java file
    By rjagan in forum New To Java
    Replies: 1
    Last Post: 04-04-2011, 11:51 AM
  3. Java source code for Dividing a file
    By LOKESHWARI in forum Advanced Java
    Replies: 2
    Last Post: 10-14-2010, 04:27 PM
  4. Replies: 0
    Last Post: 01-29-2009, 11:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •