Is there a Java Translation library that works offline?

前端 未结 3 2083
别跟我提以往
别跟我提以往 2021-02-20 03:57

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.

3条回答
  •  故里飘歌
    2021-02-20 04:32

    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.

提交回复
热议问题