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

[Plugin] Access language.yaml from php file

Solved by Hugh Barnes View solution

Started by bjoern b 7 years ago · 2 replies · 564 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 Paul Hodges, 4 weeks ago
19 490 6 days ago
Support · by Lauw, 1 week ago
2 107 1 week ago
Support · by Anna, 3 weeks ago
4 431 1 week ago
Support · by gtx, 4 weeks ago
4 380 3 weeks ago
Support · by Anna, 1 month ago
9 487 4 weeks ago