Skip to content

Instantly share code, notes, and snippets.

@usommerl
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save usommerl/68a169441824e850f78c to your computer and use it in GitHub Desktop.

Select an option

Save usommerl/68a169441824e850f78c to your computer and use it in GitHub Desktop.
Add language files to a Play! application after it has been published with 'play dist'
I assume your application name is 'myapp'.
Extract the folder in the zip file and enter the 'conf' directory.
$ cd myapp-1.0-SNAPSHOT/conf
Edit the 'application.conf' file and add language files. Package your modifications in a jar file.
All files must reside in the root of the jar file.
$ jar -cf myapp.customisation.jar application.conf messages ...
Move the jar file to the 'lib' folder.
$ mv myapp.customisation.jar ../lib/
Edit the generated startup script in the 'bin' directory. Search for the variable 'app_classpath'.
Add the jar you created to the classpath. Make sure you place your jar BEFORE the actual application jar.
Example: app_classpath="$lib_dir/myapp.customisation.jar:$lib_dir/myapp.myapp-1.0-snapshot.jar: ... "
Start your application.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment