Regional and language

Drupal 8 is capable of supporting sites in multiple languages. The details of the translation mechanism are discussed later. The regional and language settings allow you to set some defaults for the target market of your site.

Regional settings

Go to Configuration | Regional and language | Regional settings (admin/config/regional/settings).

Locale

From here you can set the Default country and First day of the week. These will have been set based on your choices during the install process, but you can change them now if they are incorrect.

Locale

Time zones

The default time zone for the site will also have been set based on the country you selected during the install process. You can change this now, but also you can decide whether you want to allow visitors to your site to specify their own time zone.

If you allow visitors to determine their own time zone, time-sensitive data will be presented to that user in their own localized time. This would affect, for example, the posting times of articles or the time of an event.

Time zones

Date and time formats

Go to Configuration | Regional and Language | Date and time formats (admin/config/regional/date-time).

Date and time formats

Here you can set the date formats for your site.

By default, there will be a set of date formats which may not be appropriate for your local users:

Format Name

Presented as

Long

Saturday, December 19, 2015 - 10:23

Medium

Sat, 12/19/2015 - 10:23

Short

12/19/2015 - 10:23

For example, in the UK, dates are presented as dd/mm/yyyy as opposed to mm/dd/yyyy, so let's change this now.

Click on Edit on the medium date format and edit it to the UK standard.

Date and time formats

Entering a valid date format string here will ensure that all dates presented in short form will display in your new format. You can see the effect of this immediately in the preview.

Similarly, edit the short format to UK style too.

Date and time formats

The current value uses standard PHP abbreviations for dates that can be found in full at http://php.net/manual/function.date.php.

Now when you go back to the article list views we created earlier, the new date formats will be applied.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset