Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

How to set the default language for PHP functions

Started by Kai 7 years ago · 0 replies · 845 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 TomW, 2 weeks ago
8 227 9 hours ago
Support · by alex, 2 months ago
8 667 23 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 5 days ago