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

Get current language issue

Started by Muut Archive 10 years ago · 2 replies · 721 views
10 years ago

When I use

TXT
grav.language.getActive 

to check for the current language key it is empty, if default language is active and


include_default_lang


is set to false.

Is this the intended behavior and if so, how can I get the language key in the case described above?

10 years ago

You should use grav.language.getLanguage as it falls back to default if the "active language" information is not available. Does it work correctly in this case?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1354 9 years ago
Archive · by Muut Archive, 9 years ago
2 935 9 years ago
Archive · by Muut Archive, 9 years ago
2 4065 9 years ago
Archive · by Muut Archive, 9 years ago
1 2953 9 years ago
Archive · by Muut Archive, 9 years ago
3 1119 9 years ago