Gizra / drupal-starter

Drupal 10 Starter with best practices
76 stars 39 forks source link

Document suggested way of changing the default language #688

Open bmunslow opened 2 months ago

bmunslow commented 2 months ago

This starter ships with English as the default language and two additional languages to enable translations.

How do you go about it when the project has a single language, other than English? Or perhaps when the project has several languages but none of them is English?

Since changing the default language in Drupal is no easy job, I was wondering if this process could be documented in the readme file.

isalmanhaider commented 1 month ago

drush site:install --locale=ar

or

one solution could be utilising https://www.drupal.org/project/drush_language

drush language:add ar
drush language:default ar
bmunslow commented 4 weeks ago

Thanks for the suggestion @isalmanhaider. The only drawback of your solution is it prevents setting up the site with the existing config, which is the whole point of using this Drupal starter.

These are the steps I had to take in a recent project to set Spanish as the default language:

No issues found for the time being. This approach doesn't take into account existing config for Solr setup which is tailored for English language.

mariano-dagostino commented 1 week ago

@bmunslow thanks for the description. Maybe there is a way to automate this. Please review #704 when you have some time.