A simple language translation service made with NinjaFramework.
To run it locally, execute "mvn ninja:run" in your folder in this directory. It will open up a server at port 8080.
curl "http://localhost:8080/api/message/{messageKey}?params={param1}¶ms={param2}¶ms={param3}¶ms...."
for example:
curl "http://localhost:8080/api/message/login.loginSuccessful"
or with parameters:
curl "http://localhost:8080/api/message/test.param?params=firstParam¶ms=secondParam"
You can change the specified language by adding the following argument to the curl command.
-H"Accept-Language:de-DE"
Use the language you want (e.g. en-US). Or you call the url in your browser (and change the language with a plugin like 'Quick Language Switcher' for Chrome).
Currently there are message-files for the languages "de" and "en" (the default) available. You find them in the src/main/java/conf folder. Read more about these files at the documentation for the ninjaframework: http://www.ninjaframework.org/documentation/internationalization.html