ReSharper 2019.1 Help

Code Inspection: Element is localizable

This inspection detects hard-coded string literals and suggests moving them to resource files. If the same string is already defined in resources, ReSharper will suggest to replace the literal with the existing resource entry.

There are two algorithms that can be applied when ReSharper detects localizable strings: Pessimistic and Optimistic. If the Pessimistic algorithm is chosen, ReSharper looks for localizable strings in all elements, except those which have the attribute Localizable(false). If the Optimistic algorithm is chosen, ReSharper analyzes only elements with the attribute Localizable(true). Depending on these settings, ReSharper defines whether a specific string is localizable, highlights localizable strings and enables the corresponding quick-fix.

By default, the Optimistic algorithm is selected. To change the algorithm for the project, right-click the project in the Solution Explorer, select Edit project item properties in the context menu, and then choose Pessimistic in the Localizable Inspector selector.

Last modified: 16 July 2019

See Also