Back to LanguageTool Homepage - Privacy - Imprint

Getting only EN languages when resources are in jar


(Yves) #1

It seems the non-English languages are not seen when bundled in a jar file.

I'm working on the Okapi step for using JLanguageTool (version 2.2 from Maven) and, for various reasons I've put the dependencies into a single jar file and have a classpath to it from the plugin jar.

When I use this the getAvailableLanguages() returns only the English languages. My guess is that those are somehow hard-coded, and the access to the other languages is not setup properly to work from a jar file.

Do you have any pointer on how I can solve this?
Thanks,
-yves


(Daniel Naber) #2

Hi Yves,

the languages are read from a file
META-INF/org/languagetool/language-module.properties in the classpath.
For multiple languages the file needs to look like this:

languageClasses=org.languagetool.language.Polish
languageClasses=org.languagetool.language.Catalan
languageClasses=org.languagetool.language.Italian
(...)

Regards
Daniel