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.
RESTful API endpoints in Drupal can allow you to expose the content of Drupal website to other external resources. These endpoints can be used for fetching data with an AJAX call or simply a web service.
If you got a generic error in Drupal and are not sure why then it's time to enable Drupal Debugging options and error reporting to better understand the error.
One of the functionality provided by multilingual modules in Drupal 8 is to allow a user to add different plural forms to the string as per the language plural formula. But if you want to change it then here is the code snippet to update the plural formula for a language.
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.
Drupal 8 supports multilingual out of the box but importing translations becomes a nightmare sometimes so here is a programmatic solution to import translations with a script, which can be used with hook_install(), hook_update() or with any other custom interface as well.
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.
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.