Drush is the ultimate tool for Drupal and it does a great job in situations where we want to import or export our Drupal database with "drush sql-cli" and "drush sql-dump" commands.
One of the most common errors you might get while working with Drupal on local is "error: unable to unlink old...". Now let's go through this scenario and see why it happens and how to fix it.
In Drupal 8 views strings like sort options, header, footer or any other string can only be translated through configuration translation but here is a code snippet to add translations for a view programmatically with config override.
Here is the quick code snippet of how we can get the current language code, current language name and all enabled languages in Drupal 8 for multilingual sites.
Subscribe to Code Snippets
While working on Drupal 8 one of the issues you might face is you won't get the "Register" link for anonymous users. Here are two simple ways how to hide the "Register" link for users with administrator roles.