Translations
Required plugin: Symfony Support.
Depending on the types of an application being developed, you may have to work with the Symfony's Translation component to abstract strings and locale-specific pieces into resources/files that provide the correct data for a specific locale.
The Symfony Support plugin assists with internationalization (commonly abbreviated as i18n) by providing completion for known translations and domains. It warns whenever a non-existing translation is used. Additionally, it lets extract translations from within controllers and templates.
Note that for these features to work, the Translator service for the Symfony application needs to be enabled.
note
Translation completion and navigation is also available when translating Symfony forms.
You can query the Translator service for specific messages by key and domain. In the editor, press CtrlSpace to invoke code completion for any of the following:
Provide a key, which determines the translation to fetch.
Provide a domain, which determines the resource file to fetch the translation from.
Completion for keys and domains is available in both PHP code and Twig templates.
To navigate to the declaration of a key or a domain, place the caret at its usage and press Ctrl0B. Alternatively, CtrlClick the usage.
Applications that require translations typically have multiple resources for every locale. In this case, choose a specific declaration to navigate to from the popup menu.

When you try to use a translation key or domain that does not exist, PhpStorm displays the corresponding warning from the Missing Translation inspection. This way, you know when a translation needs to be supplied in one of the resource files.

For translation keys, a quick-fix is available, which can create the corresponding translation key in the resource file. To apply it, place the caret at the key, press AltEnter, and choose Symfony: Add translations.

The translation key will be added to resource file where you can provide the correct value for it.
Creating translations requires writing the code-making use of the Translator service and then creating the translation in a resource file. To speed up this process, the Symfony Support plugin provides the Extract Translation action, which lets you select a word and create a translation out of it.
Right-click a word in a template and select Extract Translation from context menu:
In the Extract Translation Key dialog that opens, provide a meaningful name to the translation key.
You can also pick the resource file(s) in which the translation needs to be created and optionally select the checkbox to open the resource file once extraction is complete.
Click OK to apply your changes. The view will be updated with the correct syntax, making use of the correct translation key and domain.
The translation itself will be added to the selected resource file(s).
tip
It may be useful to assign a keyboard shortcut for the Extract Translation.
Thanks for your feedback!