Hard-coded string literals
If your source code contains hard-coded string literals, you can enable the Internationalization code inspections to highlight them. You can then extract those strings into properties files for localization or ignore them if they are not meant to be localized.
Enable highlighting of hard-coded string literals
Open the Settings / Preferences dialog Ctrl+Alt+S, expand Editor and click Inspections.
Select the desired profile, and locate the node Internationalization issues under Java.
Enable the Hard coded strings inspection to highlight hard-coded string literals in the editor.
Apply changes and close the dialog.
Now the editor will highlight hard-coded string literals, as shown in the screenshot below:

note
You can configure the severity of this inspection and specify exactly in which cases the hard-coded strings should be recognized. For example, you can opt to skip the content of the
toString()
method, or literals with no alphabetic characters.
Extracting hard-coded string literals
IntelliJ IDEA provides a special intention action i18nize hard coded string literal to extract string literals into your properties files. You can access the resource bundle using either the java.util.ResourceBundle class or a custom resource bundle class.
note
You can skip this step and specify the desired resource bundle expression in the I18nize Hard Coded String Literal dialog.
tip
You can use basic code completion when specifying the resource bundle expression. Type the class name and press Ctrl+Space after the period to select a method.
warning
This change is global, and affects all projects!
Ignoring hard-coded string literals
If you want to ignore a hard-coded string literal, use the Not requiring internationalization annotation.
Press Alt+Enter to show the intention actions for the string literal.
Select Annotate as @NonNls from the list of actions.
Specify the location where you would like to store the annotations.xml file.