Back to Intellij Community

I18nized Concatenation.Java

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

2025.3-rc-21.0 KB
Original Source

| Replaces a string concatenation (e.g. String s = "Hello " + name;) with an internationalized Java code expression (e.g.String s = MessageFormat.format(​myResourceBundle.getString(​"hello.0"), name);).
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. | | ${PARAMETERS} | | Variables used in the string concatenation, usually passed as arguments to the internationalized expression. | | ${PROPERTY_KEY} | | Property key name which is defined 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. |