Internationalizing Messages in Jelly Views


Jenkins supports internationalizing messages in Jelly views.

In Jenkins, you add a .properties file with the .jelly file in the same directory. Any changes of .properties do not require a restart of Jenkins.


As an example, consider the following jelly page:


<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:s="/lib/form">

Then you could add, for example, a Chinese localization file simply as:



Properties files should be UTF-8 encoded, at least for core or plugins which already use Java 11 and a core version greater than 2.358. More details can be found in JENKINS-41729. For older plugins, all non-ASCII characters need to be converted into hexcode. Modern IDEs do it automatically, so you can be just writing localizations in the target languages there.