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 →

[Plugin] Access language.yaml from php file

Solved by hughbris View solution

Started by bjoern b 7 years ago · 2 replies · 692 views
7 years ago

Hey there,

im currently writing a new Plugin and am wondering if it's possible to access the language.yaml inside the Plugin Folder from the php file? I tried different ways but couldn't find a solution.

I should add, that im trying to do this in an static function.

last edited 10/30/19 by bjoern b
7 years ago Solution

Hi, you ask if you can access the file, but I wonder if you actually mean access the language settings?

A Grav Language PHP object is accessible in plugins via $this->grav['language'].

👍 1
7 years ago

Thanks for the reply. That was the way i was looking for. I overlooked it in the Docs at first.

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 231 11 hours ago
Support · by alex, 2 months ago
8 667 1 day ago
Support · by Supple, 5 days ago
1 98 2 days ago
Support · by TomW, 1 week ago
3 160 3 days ago
Support · by TomW, 6 days ago
2 108 6 days ago