问题描述:

I really need to find a translation library for Java that can translate

between languages such as french,english,german - whilst not requiring

Internet connectivity.

网友答案:

For translating separate words take a look at Debian's freedict packages. They have simple text based format which easily parsable with Java.

网友答案:

As far as I can see, there are two possibilities here.

i18n

You are trying to internationalize (i18n) your offline application, in which case you don't need a translation "library" per se. Instead you need to use translation bundles and translate all possible strings in your application to their different languages. See these links for more information:

Oracle i18n Doc

Official Oracle Example

Good Java i18n Example

Dynamic Translation

You are trying to translate dynamic or user generated content offline. In which case, this is a non-trival problem. Their may be some frameworks for this, but they would be very large and unwieldy, and probably NOT free or open-source. Google Translate is the most obvious online one, and even it doesn't get it right half the time. And this is a system built by some of the top developers and computer scientists in the world working on ONLY this problem.

In short, you may want to reconsider what your application truly needs.

网友答案:

I don't know if you can find it. Think about how big can be the grammar and lexicon of only one idiom to be stored and processed later using a local library. I think can't be efficient a process translation like this.

相关阅读:
Top