I want the german date format in my install profile.

I tried in my setup script:

drush en l10n_update -y
drush vset site_default_country de
drush language-add de
drush language-default de
drush vset date_format_short "d.m.Y"

but it is not sufficient. It would not show up in the UI->configuration.regionalsettings as custom date format

manually I have to create a custom date format ("d.m.Y") first and then I can set is as wanted "date type",

I would do it via drush php-eval or better in profile-install function

update: clarified a bit

update2 meanhile I discovered hook_date_format_types :-) trying...


If you want to use a custom date format, you should write this as a record in the database. In your profile-install function, you can use following code to accomplish this:

    'format' => 'd.m.Y',
    'type' => 'custom',
    'locked' => 0,
    'is_new' => true,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.