Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

How to set the default language for PHP functions

Started by Kai 7 years ago · 0 replies · 717 views
7 years ago

Hi all,
I try to the set the language and / or locale as described in https://learn.getgrav.org/16/basics/grav-configuration . I want to use german format which should be 'de' (also tried 'de_DE'). Updating user/config/system.yaml did not change anything. Then I tried the Admin Backend with no success. And I tried the settings described in /forum/general/how-to-set-the-spanish-language-by-default-t2142 but no success.

My user.config.system.yaml starts like this:

TXT
absolute_urls: false
timezone: Europe/Berlin
default_locale: de
param_sep: ':'
wrapped_site: false
reverse_proxy_setup: false
force_ssl: false
force_lowercase_urls: true
username_regex: '^[a-z0-9_-]{3,16}$'
pwd_regex: '(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}'
intl_enabled: true
languages:
  supported:
    - de
  default_lang: de
  include_default_lang: false
  pages_fallback_only: false
  translations: true
  translations_fallback: true
  session_store_active: false
  http_accept_language: false
  override_locale: false

My user.config.site.yaml has this line:

TXT
default_lang: de

Nevertheless, when I use

{{ page.header.date|date("l") }}

it still says 'Thursday' instead of 'Donnerstag' (the german word for Thursday).

What did I miss?

Many thanks!

Suggested topics

Topic Participants Replies Views Activity
Support · by webmasterodp, 5 days ago
4 133 4 days ago
Support · by nwhitfield, 6 days ago
2 113 6 days ago
Support · by stell, 2 weeks ago
5 357 1 week ago
Support · by gravinator, 1 month ago
5 549 1 week ago
Support · by Gravver, 3 weeks ago
6 341 3 weeks ago