Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

How to set the default language for PHP functions

Started by Kai 7 years ago · 0 replies · 513 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 Thomas, 1 week ago
2 60 15 hours ago
Support · by Anna, 3 days ago
2 66 18 hours ago
Support · by Justin Young, 19 hours ago
1 33 19 hours ago
Support · by Duc , 1 week ago
2 69 6 days ago
Support · by Colin Hume, 1 week ago
2 61 6 days ago