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 →

Language-selector plugin, change selection

Solved by pamtbaau View solution

Started by iclou 6 years ago · 2 replies · 897 views
6 years ago

Hi everybody

I am using the language-selector plugin.

I would like to change the drop-down entries like having "EN" and "DE" (instead of "English" and "Deutsch").

I did not find any place to change this -

Appreciate any feedback.

6 years ago Solution

@iclou, You could try the following:

  • If not already, please create an inherited theme.
    Let's assume you called it 'mytheme'
  • Copy file /user/plugins/language-selector/templates/partials/language-selector.html.twig' into folder '/user/themes/mytheme/templates/partials
  • In the copied file make two changes:
    • Replace line 7 with: {{ language_selector.current | upper }}
    • Replace line 41 with: {{ language | upper }}
6 years ago

Thanks so much - I already use a derived thema and with your hint it works like a charm!
Best wishes !

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 227 8 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