Plugin for adding translations for PHPstorm

Verze:

23. 09. 2021

Zodpovědná osoba:

Dominik Šlechta

There is a custom plugin for phpstorm that can be used to add translations to projects.

You can download it here: https://drive.google.com/file/d/1emIGfMjWeXI_4vTGWukeDhbXykB_BtIL/view?usp=sharing

Installation: in the phpstorm settings, open the plugins tab, click on the cogwheel at the top and then select "Install plugin from disk" and choose the zip file that was downloaded from google drive.

 

You will need to restart phpstorm after installation.

After restarting, you can add a translations by right-clicking and selecting "Add to translations" (the shortcut is visible on the right in that row).

If some text is selected beforehand, it is used as a value in the translation.

 

Fields:

ID = unique identifier of the translation (if it is necessary to use it in js/vue it is necessary to add the prefix "JS_"

Název = intelligent and descriptive short name of the translation sturctures as "group - name"

Skupina = the group the translation belongs to (e.g. the page on which it is located) -> the default is "Nezařazeno", but this is not used

Hodnota = translation value (what is actually displayed)

Format = how it is displayed in the admin, i.e. whether the translation is edited in the admin as a one-line field or as a textarea (textarea is more suitable for longer texts)

Typ = based on this selection, the translation ID is inserted into the original text area after saving

  • Latte = inserts {$web['TRANSLATION_ID']}
  • Ostatní = inserts just translation ID