Naming files / Drupal 8

Netology has an excellent article on how to properly name files.

In short, all you need to do is:

Use only Latin letters and numbers;
Do not use capital letters;
Do not use spaces. Separate words with a dash;
Give meaningful names in English.

To p…


This content originally appeared on DEV Community and was authored by Vadim Filimonov

Netology has an excellent article on how to properly name files.

In short, all you need to do is:

  • Use only Latin letters and numbers;
  • Do not use capital letters;
  • Do not use spaces. Separate words with a dash;
  • Give meaningful names in English.

To perform the first three rules in Drupal 8 there is a module — Transliterate filenames for uploads.

Install:

composer require drupal/transliterate_filenames ; drush en transliterate_filenames -y

Check:

Как правильно именовать именовать файлы.jpg

kak_pravilno_imenovat_fayly.jpg

The module itself will replace uppercase letters with lowercase ones, spaces with underscores, and Cyrillic with Latin.

The only thing it won't do is that it won't translate the file name into English, so you'll have to keep an eye on this yourself.


This content originally appeared on DEV Community and was authored by Vadim Filimonov


Print Share Comment Cite Upload Translate Updates
APA

Vadim Filimonov | Sciencx (2022-04-18T04:25:54+00:00) Naming files / Drupal 8. Retrieved from https://www.scien.cx/2022/04/18/naming-files-drupal-8/

MLA
" » Naming files / Drupal 8." Vadim Filimonov | Sciencx - Monday April 18, 2022, https://www.scien.cx/2022/04/18/naming-files-drupal-8/
HARVARD
Vadim Filimonov | Sciencx Monday April 18, 2022 » Naming files / Drupal 8., viewed ,<https://www.scien.cx/2022/04/18/naming-files-drupal-8/>
VANCOUVER
Vadim Filimonov | Sciencx - » Naming files / Drupal 8. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/18/naming-files-drupal-8/
CHICAGO
" » Naming files / Drupal 8." Vadim Filimonov | Sciencx - Accessed . https://www.scien.cx/2022/04/18/naming-files-drupal-8/
IEEE
" » Naming files / Drupal 8." Vadim Filimonov | Sciencx [Online]. Available: https://www.scien.cx/2022/04/18/naming-files-drupal-8/. [Accessed: ]
rf:citation
» Naming files / Drupal 8 | Vadim Filimonov | Sciencx | https://www.scien.cx/2022/04/18/naming-files-drupal-8/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.