Back to Intellij Community

I18nized Expression.Java

java/java-impl/resources/fileTemplates/code/I18nized Expression.java.html

2025.3-rc-2886 B
Original Source

| Replaces a string literal expression (e.g. String s = "Hello";) with an internationalized Java code expression (e.g. String s = myResourceBundle.getString("hello");).
This built-in template is editable. Along with Java expressions and comments, you can also use the predefined variables that will be then expanded into the corresponding values. |

| Predefined variables take the following values: | | ${RESOURCE_BUNDLE} | | Expression of the java.util.ResourceBundle type, instance of which is available in this context. | | ${PROPERTY_KEY} | | Property key name which is specified in the corresponding properties file. Typically it is the value that is used for ResourceBundle.getString() method parameter. | | ${PROPERTY_VALUE} | | Property value which is defined in the corresponding properties file. This is the original Java string literal value. |