PyCharm 2024.1 Help

Navigate between text and message file

Enable the Django plugin

This functionality relies on the Django plugin, which is bundled and enabled in PyCharm by default. If the relevant features aren't available, make sure that you didn't disable the plugin.

  1. Press Ctrl+Alt+S to open the IDE settings and then select Plugins.

  2. Open the Installed tab, find the Django plugin, and select the checkbox next to the plugin name.

Use the gutter icons to navigate from a template to a localization file. To jump from localization file to the corresponding template, use Ctrl+Click.

Navigate from a template to locale

  1. Click icon in the gutter next to the desired tag.

  2. If a tag is referenced from several locales, select one from the popup:

    Go to localization file from template

    The selected django.po file opens in the editor, with the caret resting at the msgid that corresponds to the tag.

Navigate from a locale to template

  1. In the desired django.po file, place the caret at the comment above the locale:

  2. Go to Navigate | Declaration Ctrl+B, or use any other method, described in Navigating section.

    go to declaration

    The corresponding template files opens in the editor.

  3. Alternatively, you can press the Ctrl key and hover over the comment above the locale. The comment turns into a hyperlink. Click it to navigate to the template file.

View references to a localization tag

  1. Hover over the gutter icon next to the desired tag.

  2. Inspect the balloon with the list of locale files that reference the selected tag:

    view references to a localized tag
Last modified: 28 March 2024