Using XML in Java as language manager - java

So, I'd like to create a bilingual program. From what I have heard, xml files are way to go...
I couldn't really find anything useful with Google (when you enter Java in Google it sees the word "language" only as in "programming", instead of desired "spoken"), so if any of you could direct me to some tutorial page which explains this topic further, or even show it to me here (It can be that complicated, can it?), I'd be very grateful.
If xml is way to go, that is! If any of you have any better suggestions, I'm listening...

XML could be the way to go, but the usual approach to internationalise your Java applications is using ResourceBundles. When asking Google the right keywords are: Java i18n or Java Internationalization.
There is a basic java tutorial that can get you started with i18n. If you are writing a web application then you should check the documentation of your specific framework.

Java has a built in internationalization system that uses properties files.
Java Internationalization API Tutorial

Related

Can i use daringFireball Markdown within my JAVA application

Here's the link of daringfireball Markdown. Can i use this API in my java project? I read the whole site and did not find anything that could help me figure it out.
I also went to the wikipedia page to see if there was more API that do the same thing, but they're for web language like PHP or ruby.
I want my user to be able to use markdown as it is more simple for a non-programmer to type with this syntax.
If not, is there any other API that does the same thing for JAVA? Would it be hard to implement such thing my self as i am a starter experienced programmeer?
Thanks

How to translate a webpage from java?

I have developed a web application in java. Now I want to put translation facility without using any outside stuff like google translator.
I want to know if there are any libraries available for language translation from English to Hindi, French, Gujarati, etc ? Any alternative solutions?
The typical solution to this is to have your code look up all strings to be translated in a ResourceBundle, where you then manually enter translations for all languages supported.
Have a look at the internationalization section of the Sun Java Tutorial - http://docs.oracle.com/javase/tutorial/i18n/index.html
I think you can use the Google transalation API's. You can use the classes present in the API, from your java code.

Transform Java Library to JavaScript Library

If I have implemented a Java Library (that offers certain functionality), could I transform this into a JavaScript library, such that the same functionality can be offered?
I know this may be an ask, but, I was wondering if there are frameworks existing that help in this?
No, in general this is not possible, Java and JavaScript are more or less completely different languages.
However there are a couple of Java to JavaScript translators that you can try. Java2Script is one such tool. Apparently the Google Web Toolkit (GWT) does this as well. Source.
While you could probably do some sort of conversion, it's important to note that Java and JavaScript, while similarly named, are not at all related. Unfortunately, I think you'll be hard pressed to find a framework or system that does a good job converting one to the other. :(

A java program to search in a certain website

I want to write a Java code to parse a certain website. Each result in the website appear in a specified URL.
How can I start? Is there a good library to use? Could I benefit from your experience in this field?
Search for "web crawler" and you'll find many examples (e.g. Crawler4J or Crawler), how to solve this.
Besides Java, you'll often stumple upon Python when it comes to grepping stuff from web pages - I'm not a Python guy, but it seems to fit for the task.

FOSS java library to generate *.mobi ebooks?

Firstly there is an almost identical question but the answer is not really satisfactory.
Is there a Java or Ruby library for generating MOBI ebook documents?
The answer basically gives a link to amazon and discusses using command line tools which is not really satisfactory for a web app. I want a regular jar file w/ an api that i can invoke without any nasty process invocation.
Does anyone know of a FOSS library that provides this functionality ? I would rather simething like ITEXT that allows me to build the document and then writes the mobi file rather than something that converts an already ready PDF into the MOBI.
The best I've been able to find is a ruby library called KindleR. https://github.com/josh/kindler
I've only used it to convert basic HTML pages to mobi with pretty good success. I've never converted anything with more complicated formatting, so YMMV.

Categories